如何将dll安装到GAC中。

发布于 2024-10-07 02:43:53 字数 335 浏览 0 评论 0原文

我必须将 DLL 安装到 GAC。我已检查与我的项目相关的 GAC 中是否存在相同的 DLL。我的步骤正确吗?

1:点击文件>卸载之前的DLL卸载程序集
2:打开Visual Studio命令提示符
3:输入 C:\Windows\Microsoft.NET\Framework\v1.1.4322> gacutil.exe \i C:\xyz\My project\Projectxyz.dll

或者

将 DLL 从 Bin 拖放到 GAC 中?

是否必须为程序集提供强名称,或者我可以避免这样做吗?如果我不给出强名称会有什么副作用?

I have to install the DLL to GAC. I have checked that same DLL is present there in the GAC related to my project. Is my steps correct?

1: Uninstall the previous DLL by clicking on File > Uninstall Assembly
2: Open Visual Studio command prompt
3: Type this C:\Windows\Microsoft.NET\Framework\v1.1.4322> gacutil.exe \i C:\xyz\My project\Projectxyz.dll

OR

Drag and drop the DLL from Bin to GAC ?

Is it mandatory to give the strong name to the assembly or can I avoid it? What is the side effect if I don't give the strong name?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

手心的温暖 2024-10-14 02:43:53

要回答您的最后一个问题,,您必须对程序集进行强命名才能将其安装到 GAC 中。

我感觉您实际上并不需要将程序集添加到 GAC 中。只有在极少数情况下这样做才会有好处。除非您知道这些情况是什么,并且知道它们适用于您,否则我建议您忘记它。

To answer your last question, yes, you must strong-name your assembly in order to install it into the GAC.

Something tells me that you don't really need to add your assembly to the GAC. Only in very few cases is there a benefit to doing this. Unless you know what these cases are, and know they apply to you, I'd suggest you forget about it.

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