View Full Version : Registering COM component created with .Net

07-02-2008, 11:43 AM
I have a .Net class library component that is set to be COM visible. There's the standard registration required plus some additional registration that's needed for my particular application. I have this defined in the code and it works fine when I register it with regasm /codebase. However, when I create an installation using InstallShield none of the registration is being done. Is there any way to get it to run regasm (with the /codebase option) for me?

I know I can explicitly define the registration needed through the InstallShield Express interface, but I hate to have it defined in code and in the installer and then remember to update any changes to both.


07-02-2008, 01:47 PM
In the Files view, right-click on the file and select the Properties menu item. And then you need to check the COM Interop check box in the COM & .NET Settings tab.

Hope that helps.

07-02-2008, 07:40 PM
Thanks for the help. I didn't know about this setting. Unfortunately when I try it I get the following error when I build the install.

-6210: An error occurred building COM .NET Interop information for Component RevolveSplinePoints.dll

I searched for additional information about this error but didn't find anything that helped me although I'm wondering if there's a dependency issue.

I'm trying to create the installation for a dll that is an add-in for an application. (Similar to a Word add-in but a for different, non a MS application.) My add-in has a dependency on the interop assembly of the application. I don't see anything about this dependency in IS except in the "Releases" menu item after I build and in the resulting build where the file is copied to. Could this dependency be the problem? Ideally I would like to remove this dependency from IS because I don't want that file as part of my installation because the application I'm dependent on will have already installed it. With some additional testing I also found out that the interop of this application is only included in my install when I have the "COM Interop" option checked.

07-03-2008, 11:30 AM

I've had tremendous trouble creating .net libraries to register with com interop. However, I'm certain of these following pointers:

- Make sure you're using the .dll from the /release folder of your project, or you'll have added dependency issues.
- Make sure to create a tlb file (regasm.exe /tlb:Classname.Tlb Classname.dll)
Within Installshield, add both the TLB and the DLL
-- Right click each file, go to properties and "register for com interop"
-- Go to the "Components" tab (Installation Designer->Organization->Components) Click the entries for the tlb and dll, and make sure that the option for ".net com interop" is set to "yes"

Hope that helps..


07-07-2008, 07:36 PM
Hi Daryl,

Thanks for your help. I hadn't thought of including the tlb file since it's not really needed in my case. I did add it to my file list and enabled both of them for COM Interop. I'm unable to find the setting you mention below. Without setting that I'm still getting the -6210 error.

-- Go to the "Components" tab (Installation Designer->Organization->Components) Click the entries for the tlb and dll, and make sure that the option for ".net com interop" is set to "yes"

I had already given up on getting this to work and just added the required registration to the installer. If I need to make any changes to the registration I'll have to remember to update it in both places but at least this works.


09-30-2009, 05:13 PM
I am struggling with slightly different issue:

The build on my dev machine with InstallShield 2009 (Enterprise full version) just works fine, but when the CM try to build with the same source on InstallShiled 2009 Standalone version, they got 6210 error on just one of the 3 .NET dll files we need to register.

Any suggestions? It's urgent!