检查GAC程序集 [英] Check GAC for an assembly
本文介绍了检查GAC程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何以编程方式检查GAC程序集的?
How to programmatically check GAC for an assembly?
推荐答案
甚至没有试图让复杂的,你可以只掏出来 GACUTIL
并捕获输出。例如, GACUTIL / L Microsoft.Practices.Unity
给我:
Without even trying to get complicated, you could just shell out to gacutil
and capture the output. For example, gacutil /l Microsoft.Practices.Unity
gives me:
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Microsoft.Practices.Unity, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31
bf3856ad364e35, processorArchitecture=MSIL
Number of items = 1
与 GACUTIL / L Some.Nonexistant.Assembly
:
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Number of items = 0
这是容易实现和解析,并且不依赖于任何第三方实现。
This is easy to implement and parse and isn't dependent on any third-party implementations.
这篇关于检查GAC程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文