使用PowerShell查看全局程序集缓存(GAC)的内容

Guy*_*Guy 17 powershell gac

有没有办法使用PowerShell查看GAC的内容?

Kei*_*ill 17

另一个选择是PowerShell社区扩展安装了GAC提供程序,因此您可以这样做:

dir gac:
Run Code Online (Sandbox Code Playgroud)

如果您使用的是PowerShell V2,请务必获取1.2 Beta.


Che*_*eso 6

列出GAC中的条目;

gacutil -l
Run Code Online (Sandbox Code Playgroud)

在powershell中,您可以解析上面的文本输出.我不知道检查GAC的托管界面.


Fra*_*nič 5

文档所述:

从.NET Framework 4开始,全局程序集缓存的默认位置是%windir%\ Microsoft.NET\assembly.在早期版本的.NET Framework中,默认位置为%windir%\ assembly.

您可能希望在适当的子目录中搜索,或者甚至在两个子目录中搜索.