为 COM 互操作注册、gac 程序集时顺序重要吗?

发布于 2024-09-06 08:54:50 字数 282 浏览 3 评论 0原文

为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

近箐 2024-09-13 08:54:50

顺序重要吗?

不。

以下情况是否需要在GAC中重新安装
dll 已更改?

是的。

是否需要重新注册COM
dll什么时候改变的?

这要看情况。如果您在 COM dll 中添加了新类型,那么可以。如果您只更改了现有类型中的一些内部内容,那么就不会。但为了安全起见,请务必取消注册并重新注册。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文