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

≡放荡痞女 提交于 2019-12-07 06:45:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!