Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does order matter when registering, gac-ing assemblies for COM interop?

When registering .NET assemblies for COM Interop, I do two things, currently in this order:

regasm /tlb:MyDll.tlb Mydll.dll

gacutil /i Mydll.dll

I use regasm to register the type library for COM and gacutil to install the assembly into the GAC. Does it matter which order I do these two actions? Also, as I make updates to my dll, do I need to un-register and re-register it, uninstall it from the gac and re-install it, both or neither?

like image 264
Ben McCormack Avatar asked Jun 17 '10 13:06

Ben McCormack


1 Answers

Does order matter?

No.

Do you need to reinstall in GAC when the dll has changed?

Yes.

Do you need to re-register for COM when dll has changed?

That depends. If you added new types in your COM dll, then yes. If you only changed a few internal things in existing types, then no. To be safe though, always un-register and re-register.

like image 54
Jakob Christensen Avatar answered Sep 28 '22 05:09

Jakob Christensen