tags:

views:

26

answers:

2

I have a .net component that will be called by unmanaged code. I want to create an installer for the .net component that will in one step..

-install it to the desired directory -generate the tlb file -run the regasm command

The deployers of this component dont have knowledge of the .net framework.

Any ideas?

Thanks.

A: 

It's been a while but I think something like this would work:

Add an Install.Installer class to your component, override it's Install and Uninstall methods and use RegisterAssembly to register the Assembly.
Then create a Visual Studio setup project and add a custom action to run your Installer methods during the setup.

Actually, here's a thread discussing just this and there's a comprehensive answer in there: http://www.dotnet247.com/247reference/msgs/18/90440.aspx

ho1
+1  A: 

The type library only needs to be deployed if you want your client to use the component themselves when they write their own code using your COM server. That's unlikely given your description of their skills. If required anyway, you are better off simply deploying the .tlb yourself instead of auto-generating it during install.

Your client won't have Regasm.exe on their machine, it is only available in the Windows SDK. Nevertheless, registering ComVisible components is a standard capability of MSI. You can create your own installer that registers the component with a Visual Studio Setup project. Set the Register property to "vsdrpCOM".

Hans Passant