當試圖使用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
謝謝!