我们如何检查 Windows 批处理文件中的 GAC 中是否存在程序集?
我在尝试:
C:\>gacutil /l ExistentAssembly
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
ExistentAssembly, Version=4.0.0.0, Culture=neutral, PublicKeyToke
n=023235e0weaaa8f0, processorArchitecture=x86
Number of items = 1
当我们列出一个不存在的程序集时:
C:\>gacutil /l NonExistentAssembly
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Number of items = 0
但是没有找到项目时没有错误级别。这里的方法是什么?