GACUtil“程序集成功添加到缓存”但“项目数 = 0”
为什么,当我跑步时:
gacutil –i myAssembly.dll
我得到:
Assembly successfully added to the cache
但是当我跑步时:
gacutil –l myAssembly.dll
我得到
Number of items = 0
?
Why, when I run:
gacutil –i myAssembly.dll
do I get:
Assembly successfully added to the cache
But then when I run:
gacutil –l myAssembly.dll
I get
Number of items = 0
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试
最后不要添加.dll。因此,如果 dll 在 GAC 中注册,它将显示
http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx
try with
donot add .dll at last.So if the dll is registered in GAC it will display
http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx
确实是愚蠢的理由,但我感觉花了好几个小时才解决,而且当你试图解决一个复杂的问题时,这并不是你真正想要处理的事情。
要将程序集添加到 GAC,您需要指定 .dll 扩展名,但是当尝试查询它或取消注册它时,您必须不指定 .dll 扩展名。
运行
就会返回
Silly reason, really, but it took me what felt like hours to fix and is not really something you want to have to deal with when you’re in the middle of trying to figure out a complex problem.
To add the assembly to the GAC you need to specify the .dll extension, but when trying to query it or unregister it you must NOT specify the .dll extension.
Running
will return