如何判断给定程序集在GAC中注册了哪些应用程序? [英] How to tell which application(s) have a given assembly registered in the GAC?

查看:80
本文介绍了如何判断给定程序集在GAC中注册了哪些应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试使用gacutil.exe删除给定的程序集(在这种情况下为log4net.dll,但应适用于任何类似的情况)时,由于应用程序需要该程序集,因此操作失败.但是,我无法弄清楚如何确定哪个应用程序实际需要它.由于输出似乎表明该要求已记录在MSI数据库/Windows Installer中,因此似乎某些util能够列出MSI数据库中注册的所有GAC程序集(我可以使用log4net搜索条目) .dll)或允许我指定一个特定的GAC程序集,它将列出依赖项(如果存在相关的依赖项链,则最好列出这些依赖项:)

When trying to remove a given assembly (log4net.dll in this case, but it should apply to any similar case) using gacutil.exe, the action fails due to the assembly being required by an application. However, I can't figure out how to tell which application(s) actually require it. Since the output seems to indicate that the requirement is logged in the MSI database / Windows Installer, it would seem like some util would be able to either list all the GAC assemblies registered in the MSI database (and I could just search for entries with log4net.dll) or allow me to specify a particular GAC'd assembly and it would list the dependencies (ideally with any related dependency chains if they exist :)

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

谢谢!

推荐答案

我从没找到任何适合的方法.我所做的(奏效,但很糟糕)是运行procmon来查看gacutil正在访问的内容,并注意到它击中了HKCR \ Installer \ Products \ 098D637EEF1AFF14586E779FE4C38C4D键.当我在regedit中查看该密钥时,它表明该产品是"Plantronics Spokes软件".

I never found anything good for this. What I did (that worked, but sucks) was to run procmon to see what gacutil was accessing and noticed it hit a key HKCR\Installer\Products\098D637EEF1AFF14586E779FE4C38C4D. When I looked under that key in regedit, it showed that the product was "Plantronics Spokes Software".

我进入appwiz.cpl并删除了该应用程序,然后gacutil/l log4net显示log4net不再在GAC中.

I went into appwiz.cpl and removed that app, then afterwards gacutil /l log4net showed that log4net wasn't in the GAC anymore.

我仍然很想找到一个更好的答案,但是我想现在运行procmon,过滤到process = gacutil.exe,HKCR \ Installer \ Products下的路径"总比没有好.

I'd still love to find out a better answer, but I guess for now 'run procmon, filter to process=gacutil.exe and path under HKCR\Installer\Products' is at least better than nothing.

这篇关于如何判断给定程序集在GAC中注册了哪些应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆