【问题标题】:Two consecutive gacutil commands, within 15 sec. of each other:两个连续的 gacutil 命令,在 15 秒内。彼此的:
【发布时间】:2012-06-12 21:15:37
【问题描述】:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools>gacutil.
exe /i "C:\Users\wherever\ClassLibrary1.dll"
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools>gacutil.
exe /uf "ClassLibrary1.dll
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

No assemblies found matching: ClassLibrary1.dll
Number of assemblies uninstalled = 0
Number of failures = 0

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools>

我可以看到“ClassLibrary1.dll”在 C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ClassLibrary1\v4.0_1.0.0.0__2efc1c0b243a0c09 中。 gacutil.exe 是否曾经安装过这个东西?不能卸载吗?它可以看到它刚刚告诉我它安装了什么吗?它是为安装或卸载 .NET 4 程序集而设计的吗?

【问题讨论】:

  • 看来您必须删除多余的引号。 /uf "ClassLibrary1.dll -> /uf ClassLibrary1.dll

标签: .net .net-4.0 com interop assemblies


【解决方案1】:

尝试在第二个命令中从程序集名称中删除 .dll。

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools>gacutil.
exe /uf ClassLibrary1

根据文档, gacutil /u 命令要求提供程序集名称,而不是路径或文件名。 我在我的一个程序集最后用 .dll 尝试了这个,得到了和你一样的错误。

不能保证这是正确的,但这是我所看到的。

另外值得注意的是,gacutil /u 或 /uf 可以一次删除程序集的多个版本。因此,如果您不想全部删除它们,则值得指定版本。

【讨论】:

  • 也感谢您的最后一段。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多