2011-03-25 14 views
13

我已經安裝了一個使用gacutil的DLL。我可以通過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 

爲什麼不能正常工作?我如何卸載它?

回答

23

安裝程序集需要DLL的路徑名爲的。卸載要求組件的顯示名稱。它們不必相互類似。查看Assembly.FullName屬性。 gacutil.exe /l(列表中的ell)會顯示一個顯示名稱列表。

9

沒關係。

gacutil.exe /u SI.ArchiveService.CommonLogic.Exceptions 

沒有工作。另外導航到C:\ WINDOWS \ assembly,右鍵點擊它,然後選擇卸載就可以了。我通過查看它的屬性並且名字沒有dll擴展名來解決它。

3

這是一個小更安全,如果你有相同的顯示名稱的多個組件在GAC

gactutil.exe /u myDll,Version=1.1.0.0,Culture=en,PublicKeyToken=874e23ab874e23ab 
0

來到這裏,同時尋找答案,但並沒有完全得到。

你真正需要做的是用雙引號「的AssemblyName」周圍的整個組件的名稱即

「YOURDLLNAME,版本= 6.3.0.0,文化=中性公鑰= 31bf3856ad364e35」

全過程,請使用命令提示符導航到此路徑:C:\ Program Files(x86)\ Microsoft SDK \ Windows \ v8.0A \ bin \ NETFX 4.0工具

並運行查詢:gactuil.exe/u「YOURDLLNAME,Version = 6.3.0.0,文化=中立,PublicKeyToken = 31bf3856ad364e35「

希望這可以幫助別人

相關問題