C# – Creating a setup (MSI) to register (regasm) an assembly

ccomgac

I'm working on a toolbar for IE using .NET. Currently, I insert my .NET assemblies with gacutil, and register my COM assembly with regasm.

I want to create a setup (MSI) for the project, but I can't seem to register the types. I have everything in GAC folder of the setup project, but I can't find a way to essentially run regasm – and I don't want to include it in the project. The /regfile option is not the same as registering the types.

I've tried using tlbexp to export a .tlb file and include it in the Application folder of the MSI but it doesn't seem to fix the problem. If the run the MSI installer and manually run regasm on my assembly, everytihng works fine. Any ideas?

Thanks.

Best Answer

According to this:

http://www.codeproject.com/KB/cs/C__Deployment.aspx?fid=439178

In the properties of Added output file in Setup project, make sure that the Register property is set to vsdrpCOM. Setting this property ensures the MSI file to register the ActiveX component using regasm tool in .NET. During installation, the installer itself takes care of registering this C# component to expose the COM interface.

Related Topic