问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/3062264/does-order-matter-when-registering-gac-ing-assemblies-for-com-interop