GACUtil“程序集成功添加到缓存”但“项目数 = 0”

发布于 2024-09-13 07:15:17 字数 288 浏览 6 评论 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 技术交流群。

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

发布评论

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

评论(2

情域 2024-09-20 07:15:17

尝试

gacutil –l  myAssembly

最后不要添加.dll。因此,如果 dll 在 GAC 中注册,它将显示

Number of items = 1

http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx

try with

gacutil –l  myAssembly

donot add .dll at last.So if the dll is registered in GAC it will display

Number of items = 1

http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx

纵性 2024-09-20 07:15:17

确实是愚蠢的理由,但我感觉花了好几个小时才解决,而且当你试图解决一个复杂的问题时,这并不是你真正想要处理的事情。

要将程序集添加到 GAC,您需要指定 .dll 扩展名,但是当尝试查询它或取消注册它时,您必须指定 .dll 扩展名。

运行

gacutil –l  myAssembly

就会返回

Number of items = 1

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

gacutil –l  myAssembly

will return

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