I have a DLL written in C# and set for COM visibility. I have it setup as a side-by-side assembly and can successfully deploy the application to client PCs registration free. My question is related to the development PC. Is it possible to compile against the DLL in a similar registration-free manner or is registration required on the development machine? I have tried adding the DLL directly though the Project -> References menu and get an error stating "Can't add a reference to the specific file." The DLL is sitting in the same directory as the .vbp file and I have tried adding the DLL both with and without the client app manifest being present.
VB6 compile against side-by-side assembly
612 Views Asked by davidk At
1
There are 1 best solutions below
Related Questions in COM
- How to program a COM object with an IEnumerator, IEnumerable interface inside
- WinAPI - right mouse drag & drop and IContextMenu
- Function Returning Excel COM Objects Unexpectedly
- Windows ContextMenuHandler names - Document conflict?
- How to publish a console application with COM interop and trim unused code
- IContextMenu Handler - Should ShellExecute or CreateProcess be used to InvokeCommand?
- Windows Explorer Conditional Context Menu Item for Drive?
- How do I fix an error while trying to send email using Outlook with COM?
- ITypeLib2.GetLibStatistics() always throws AccessViolationException in C#
- Directwrite is not always able to query font
- How can I pass a C++ struct to a C# DLL method using COM interop
- VBA PowerPoint Run-time error '-2147467259' (80004005): Presentation.Close: Failed
- PHP using a dll with COM + dotnet
- d3d11 triangle rendering failure despite everything being properly initialized
- COM context menu InvokeCommand not being called
Related Questions in VB6
- ORACLE: Tabs used for indentation converted to spaces in stored procedure when executing through DSN connection
- How to enable a menu that I added to external program on VB6
- microsoft from 2.0 controler textbox to retrieve the hindi content in vba
- VB6 compiled DLL giving CLASS_E_CLASSNOTAVAILABLE issue
- VB6 Project restore from Icon tray
- Can 64-bit Excel VBA use VB6 ActiveX?
- Separate batch of xml using vb6
- Translating decryption function from VB6 to C#
- No value given for one or more required parameters. in Vb6.0
- Read Text File Content from HTTPS Web using VB6
- Setting Working Directory for compiled VB6 application
- becubed oletool missing function call servertime.refresh
- VB6, Win10 x64, MS Office 2016, the Office (Excel) 16 reference is not available, VB, how to add?
- How to set a data comparing with row and column of msflexgrid in vb6
- What is the proper way to create a win32 toolbar on vb6 using win32 api?
Related Questions in COM-INTEROP
- Visual Studio write to Office 365 word
- How to publish a console application with COM interop and trim unused code
- How to obtain a COM object type of an array?
- Is this programming pattern the solution to Excel COM interop memory leaks?
- Connect to Running Program via COM - Marshal.GetIUnknownForObject
- .NET 6.0 comhost registration fails with error 0x80008083
- Cannot Scaffold Access Database after Office365 Upgrade - EFCore + Visual Studio 2019
- How can I expose c# classes and methods as <globals> in the COM interface?
- How to use FindAll() with the nuget package Interop.UIAutomationClient
- 2 projectname.comhost.dll in same build directory possible?
- Interop function call from Excel to PowerPoint much slower in C# compared to VB.net (when run for the first time)
- CS1545 error with specific COM object properties
- Interop Assembly Embedd
- Problem retrieving email sender in Outlook Interop
- Get value from System.__Object in C#
Related Questions in SIDE-BY-SIDE
- Redirecting SideBySide Assemblies
- ClickOnce for .NET Framework application with side-by-side dependencies in manifest
- Can I make it so that a third-party application can use several of my DLLs with the same name but different versions?
- Side-by-side configuration error in Visual Studio 2019
- side by side eror,microsoft.VC80.MFC, version ="8.050608.0" could not be found
- Pyzo is not starting on windows 11
- ERROR: Activation Context generation failed at the end of trace file, with NO previous ERROR
- VB.NET "Enable application framework" with side by side assembly
- SideBySide issue with ArcGISRuntime SDK version100.11
- SxS .NET COM in vb6: ActiveX component can't create object?
- How to create a manifest in C# vs project to limit the mstscax.dll search path of AxInterop.MSTSCLib?
- VB6 RegFreeCom SideBySide SxS Manifest Test for TABCTL32.ocx
- vb6 "regfreecom" autocreate manifest for ocx file
- When using Click2Run/SxS MS Access DBMS via ADO, how can I access Database object?
- .NET Core + .NET 4 In Process Side By Side Execution?
Related Questions in REGFREECOM
- .Net Framework RegFree COM Manifest Match error
- ClickOnce for .NET Framework application with side-by-side dependencies in manifest
- Is it possible to use Redemption.dll without admin rights?
- Calling C# compiled DLL classes and functions from VBA (excel)
- COM reg free and NET(5,6,7) version: is it possible?
- How to instantiate a ComVisible class in a .NET Core assembly from .NET Framework application?
- How to have multiple versions of a Delphi COM Server at the same time?
- ActCtx + manifest + comhost + .NET 6.0: does it work, does anyone has a working example?
- RegFree COM: CoClass should return an object instance of a type from another assembly
- How to create a manifest in C# vs project to limit the mstscax.dll search path of AxInterop.MSTSCLib?
- VB6 RegFreeCom SideBySide SxS Manifest Test for TABCTL32.ocx
- vb6 "regfreecom" autocreate manifest for ocx file
- How use Redemption that it works independent from other installed software containing own Redemption Version?
- How get "miscStatus" from vb6 ocx?
- Sxs(manifest) with VB6 application
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
That adds a reference to a type library. A type library is a language-independent description of the types in a COM component, VB6 uses it to know how generate efficient code and to provide type checking and auto-completion. A type library is the exact equivalent of metadata in a .NET assembly.
Traditionally, and the way VB6 did it, the type library was embedded as a resource in a DLL. So you are probably used to picking a DLL in the dialog. That however doesn't work so well when the DLL is generated by C#, the type library can only be generated after the C# code is compiled. You have to pick the .tlb file in the VB6 dialog. The traditional way starts with the COM component being described in the IDL language, the type library can be generated before the code is compiled so can easily be embedded in the final DLL. It is technically possible to do it in C# as well, but the build steps are very laborious and painful, you essentially have to build the DLL twice with different build commands.
The type library for a C# library is normally generated in one of three ways:
The first bullet is the normal choice and very desirable because you can never forget to update the type library this way. It is perfectly fine on a dev machine since you only really care about reg-free deployment on the user's machine. You probably got into trouble by not doing this anymore.
Using the 3rd choice is okay and more compatible with your goals, run Tlbexp from the Visual Studio Command Prompt. Just keep in mind that you have to do it again when you make changes to your C# code. Forgetting this once and losing clumps of head-hair trying to figure out why your C# changes don't seem to be effective or getting hard-to-diagnose error codes gives you lots of reasons to consider the 1st bullet again :) You can emulate the reg-free scenario by running Regasm.exe with the /uninstall option.