Assembly not registering for COM now that it is .NET 4.5.1 - Advanced Installer Community
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Assembly not registering for COM now that it is .NET 4.5.1

I have recently increased the .NET version that an assembly works under from 3.5 to 4.5.1. Previously I was able to register it for COM interop by going to the file and under registration ticking the box for COM interop.

The file is now using .NET 4.5.1 and this no longer works. (I am not sure that this is the reason but it does seem like it is what is happening). When I go the to file and do:

C:\Users\Administrator\Desktop>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe" /codebase MyFile.dll"

It registers and can be seen by the other application.

Ideally I would like the installer to do the equivalent of this:

C:\Users\Administrator\Desktop>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe" /codebase /tlb MyFile.dll"

so that the tlb file is created and saved in the same directory as my assembly. I have not worked out how to do this so any suggestions would be helpful.

Thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Assembly not registering for COM now that it is .NET 4.5.1

Hello,

Are you using our "Assemblies" page to install in a private location your assembly? To have a clear view of your installation scenario, please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them.
Ideally I would like the installer to do the equivalent of this:

C:\Users\Administrator\Desktop>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe" /codebase /tlb MyFile.dll"

so that the tlb file is created and saved in the same directory as my assembly. I have not worked out how to do this so any suggestions would be helpful.
Unfortunately, we don't have support to generate TLB files from your assembly. This improvement is still on our TODO list and hopefully it will be available in the future.

In the meantime as a workaround you can try to use a custom action to register your assembly with the desired command line. Please take a look on our "Call regasm in custom action matching product bitness" thread which debates a similar topic.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”