c# - 我可以通过 gacutil 安装,但不能卸载相同的 dll

标签 c# gac gacutil

我已经使用 gacutil 安装了一个 DLL。

gacutil.exe /i SI.ArchiveService.CommonLogic.Exceptions.dll

使用gacutil/l 显示确实安装了。

SI.ArchiveService.CommonLogic.Exceptions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=925c8734ae397609, processorArchitecture=MSIL

然后我想卸载它。

gacutil.exe /u SI.ArchiveService.CommonLogic.Exceptions.dll
Microsoft (R) .NET Global Assembly Cache Utility.  Version 3.5.30729.1
Copyright (c) Microsoft Corporation.  All rights reserved.

No assemblies found matching: SI.ArchiveService.CommonLogic.Exceptions.dll
Number of assemblies uninstalled = 0
Number of failures = 0

为什么这行不通?如何卸载它?

最佳答案

安装程序集需要 DLL 的路径名。卸载需要程序集的显示名称。他们不必彼此相似。查看 Assembly.FullName 属性。 gacutil.exe/l(如列表中所示)为您提供显示名称列表。

关于c# - 我可以通过 gacutil 安装,但不能卸载相同的 dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5431412/

相关文章:

.net - VS 2010 工具的 gacutil.exe 在哪里安装程序集?

c# - GAC 32 位与 64 位

.net - 我应该使用什么 gacutil.exe?

c# - 静态类 C# 中的惰性属性初始化

C# 或 SQL 最有效的解决方案

.NET框架被复制到 'compiler/CLR'和'GAC?

ssis - 安装到 SSIS 的 GAC 时,WinSCP .NET 程序集抛出 "The winscp.exe executable was not found at location of the assembly"

c# - 异步读取 Excel 工作表

c# - AddressAlreadyInUseException。端口未释放

.net - GAC 文件夹 - 太多?