2

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

ただし、アイテムが見つからない場合、エラーレベルはありません。ここでのアプローチは何ですか?

4

1 に答える 1