为 COM 互操作注册、gac 程序集时顺序重要吗?
为 COM Interop 注册 .NET 程序集时,我做了两件事,目前按此顺序:
regasm /tlb:MyDll.tlb Mydll.dll
gacutil /i Mydll.dll
我使用 regasm
注册 COM 的类型库,并使用 gacutil
将程序集安装到GAC。我执行这两个操作的顺序有关系吗?另外,当我更新我的 dll 时,我是否需要取消注册并重新注册它,从 gac 中卸载它并重新安装它,两者都还是都不?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不。
是的。
这要看情况。如果您在 COM dll 中添加了新类型,那么可以。如果您只更改了现有类型中的一些内部内容,那么就不会。但为了安全起见,请务必取消注册并重新注册。
No.
Yes.
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.