我可以通过gacutil安装,但不能卸载相同的DLL

Kas*_*sen 13 c# gac gacutil

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

gacutil.exe /i SI.ArchiveService.CommonLogic.Exceptions.dll
Run Code Online (Sandbox Code Playgroud)

使用gacutil/l表明它确实安装了.

SI.ArchiveService.CommonLogic.Exceptions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=925c8734ae397609, processorArchitecture=MSIL
Run Code Online (Sandbox Code Playgroud)

然后我想卸载它.

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
Run Code Online (Sandbox Code Playgroud)

为什么这不起作用?我该如何卸载它?

Han*_*ant 26

安装程序集需要DLL 的路径名.卸载需要程序集的显示名称.它们不必彼此相似.查看Assembly.FullName酒店. gacutil.exe /l(如列表中所示)获取显示名称列表.


Kas*_*sen 9

没关系.

gacutil.exe /u SI.ArchiveService.CommonLogic.Exceptions
Run Code Online (Sandbox Code Playgroud)

做完了.还导航到C:\ WINDOWS\assembly,右键单击它然后选择卸载就可以了.我通过查看它的属性找出它,并且名称没有dll扩展名.


wch*_*ard 5

如果 GAC 中有多个具有相同显示名称的程序集,这会更安全一些

gactutil.exe /u myDll,Version=1.1.0.0,Culture=en,PublicKeyToken=874e23ab874e23ab
Run Code Online (Sandbox Code Playgroud)