当试图使用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
谢谢!