2011-10-22 58 views
4

當試圖使用gacutil.exe刪除給定程序集(本例中爲log4net.dll,但它應該適用於任何類似情況)時,由於應用程序需要程序集,操作失敗。但是,我無法弄清楚如何判斷哪個應用程序實際需要它。由於輸出似乎表明該需求記錄在MSI數據庫/ Windows安裝程序中,因此似乎某些util將能夠列出在MSI數據庫中註冊的所有GAC程序集(並且我可以僅使用log4net搜索條目.dll文件),或者讓我指定特定的GAC'd組件,它會列出依賴關係(最好有任何相關的依賴鏈,如果他們存在:)如何判斷哪些應用程序在GAC中註冊了特定程序集?

C:\ » gacutil /u log4net 
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1 
Copyright (c) Microsoft Corporation. All rights reserved. 


Assembly: log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL 
Unable to uninstall: assembly is required by one or more applications 
Pending references: 
       SCHEME: <WINDOWS_INSTALLER> ID: <MSI> DESCRIPTION : <Windows Installer> 
Number of assemblies uninstalled = 0 
Number of failures = 0 

謝謝!

回答

3

我從來沒有發現任何有用的東西。我所做的(工作,但很糟糕)是運行procmon來查看gacutil正在訪問什麼,並注意到它碰到了一個關鍵的HKCR \ Installer \ Products \ 098D637EEF1AFF14586E779FE4C38C4D。當我在註冊表中查看該密鑰時,顯示該產品是「Plantronics Spokes Software」。

我進入appwiz.cpl並刪除了該應用程序,然後gacutil/l log4net顯示log4net不再位於GAC中。

我仍然很想找出一個更好的答案,但我想現在'運行procmon,過濾到process = gacutil.exe和HKCR \ Installer \ Products下的路徑至少比沒有好。

相關問題