rick
Posts: 8
Joined: Mon Dec 12, 2005 6:59 pm

How to register assemblies for COM interop

I have a managed assembly that I need to register for COM interop. The assembly is strong named and I've imported the the registry entries into my Advance Installer project and set the Codebase property to point to the installed file location. This seems to work buy I'm wondering if this is the proper way to register COM callable assemblies. I've tried using the "Assemblies" window to do this and specified a private install but that does not seem to create the necessary registry entries for COM. What does Advanced Installer do with assemblies specifiec here if they are not installed in the GAC? Any guidance on this would be appreciated.

Thanks!
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I'm afraid that Advanced Installer doesn't offer any direct support for registering a .Net DLL as a COM Component. We have this feature on our TODO list and will be available in a future version of AI. I cannot give you an ETA for now.

However this could be achieved with the use of a custom action that runs RegAsm tool and register the DLL.
http://www.advancedinstaller.com/user-g ... -page.html

In order to locate RegAsm on the target machine you could use a search.
http://www.advancedinstaller.com/user-guide/search.html

Best regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
jasonslater2000
Posts: 5
Joined: Wed Jan 31, 2007 5:43 am

any word on this?

still would like AI to do regasm /codebase automagically... any word on when this functionality is coming?

thanks,
jason
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Jason,

This feature was added with the 4.9 version of Advanced Installer. To register your assembly for COM interoperability select the file in "Files and Folders" page and choose "Register .Net assembly for COM Interoperability" option from "Properties" dialog.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Quadiago
Posts: 71
Joined: Thu May 31, 2007 9:07 am

Hi there

I've got some files that need to be registered for COM interop on install, but Advanced Installer isn't adding Codebase values to the appropriate keys. Do I need to add these manually? Shouldn't this be done for you as part of that feature you mentioned?

Thanks!
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
Shouldn't this be done for you as part of that feature you mentioned?
I'm afraid not, but we will investigate this and include it in a future version of AI. Until then you can export the registry entries (using Regasm.exe with command line) to a reg file and import this reg file in Advanced Installer "Registry" page.

http://msdn2.microsoft.com/en-us/library/tzat5yw6.aspx

Best Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
guidway
Posts: 11
Joined: Fri Nov 02, 2007 4:03 am

Until then you can export the registry entries (using Regasm.exe with command line) to a reg file and import this reg file in Advanced Installer "Registry" page
.

I've been following this thread also as I'm attempting to do the same thing. The above statement will not work if your assembly contains custom registration information such as the case with mine. Microsoft directly states in the regasm msdn page: "Note that the .reg file does not contain any registry updates that can be made by user-defined register functions". posted from: http://msdn2.microsoft.com/en-us/librar ... s.71).aspx

Just an FYI
guidway
Posts: 11
Joined: Fri Nov 02, 2007 4:03 am

Another option

I just stumbled on another option if anyone needs it... I went into my Visual Studio .NET project and created an Installer Class with the necessary overrided Install/Uninstall methods that I needed for registration and then went into my Advanced Installer project, clicked on Custom Action -> Create New Custom Action -> Custom .NET Installer Action and pointed to the Assembly I'm referencing and now everything registers correctly. This doesn't even require you to have anything in the Assembly tab or Files/Folders tab of Advanced Installer, the Custom action is all you need.

Hope this helps
guid
Martin
Posts: 6
Joined: Thu Oct 23, 2008 2:36 pm

Re: How to register assemblies for COM interop

I'm using the auto-register option, but the codebase entry produced by our installer will look like this:
filC:\///C:\Programme\Company\Product\bin\assembly.dll

while it should look like this:
file:///C:/Programme/Company/Product/bin/assembly.dll

Synchronization is set to buildtime.
Am I doing something wrong or is this a bug? I'm using 6.6 with enterprise license.

Thx in advance.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How to register assemblies for COM interop

Hi,

I'm not sure why you are encountering this behavior. Can you please send us the AIP (project) file and the assembly with the problem to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”