如何将dll安装到GAC中。
我必须将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要回答您的最后一个问题,是,您必须对程序集进行强命名才能将其安装到 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.