gpt4 book ai didi

.net - 检查 GAC 的程序集

转载 作者:行者123 更新时间:2023-12-03 10:39:40 33 4
gpt4 key购买 nike

如何以编程方式检查程序集的 GAC?

最佳答案

甚至不用试图变得复杂,你可以直接支付给 gacutil并捕获输出。例如,gacutil /l Microsoft.Practices.Unity给我:

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

这很容易实现和解析,并且不依赖于任何第三方实现。

关于.net - 检查 GAC 的程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1933947/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com