A simple command line tool to view assembly references.
Install from Chocolatey package:
C:\> choco install asmspy
Or download AsmSpy as a .zip here. The .zip file contains AsmSpy.exe.
How it works
Simply run AsmSpy giving it a path to your bin directory (the folder where your project's assemblies live).
It will output a list of all conflicting assembly references. That is where different assemblies in your bin folder reference different versions of the same assembly.
|all||list all assemblies and references.
Supported formats: -a, --all
|nonsystem||ignore system assemblies.
Supported formats: -n, --nonsystem
|noconsole||do not show reference output on console.
Supported formats: -nc, --noconsole
|silent||do not show any output, only warnings and errors will be shown.
Supported formats: -s, --silent
|dgml||export dependency graph to a dgml file.
Supported formats: -dg <filename>, --silent <filename>
|rsw||Will only analyze assemblies if their referenced assemblies starts with the given value.
Supported formats: -rsw <string>, --referencedstartswith <string>
|i||include subdirectories in search.
Supported formats: -i, --includesub
To see a list of all assemblies and all references, just add the 'all' flag:
AsmSpy D:\Source\sutekishop\Suteki.Shop\Suteki.Shop\bin --all
To check only a single assembly provide a path to the file:
To ignore system assemblies, add the 'nonsystem' flag.
The output looks something like this:
Reference: System.Runtime.Serialization 22.214.171.124 by Microsoft.ServiceModel.Samples.XmlRpc 126.96.36.199 by Microsoft.Web.Mvc 188.8.131.52 by Suteki.Shop Reference: System.Web.Mvc 184.108.40.206 by Microsoft.Web.Mvc 220.127.116.11 by MvcContrib 18.104.22.168 by MvcContrib.FluentHtml 22.214.171.124 by Suteki.Common 126.96.36.199 by Suteki.Common 188.8.131.52 by Suteki.Shop 184.108.40.206 by Suteki.Shop Reference: System.ServiceModel.Web 220.127.116.11 by Microsoft.Web.Mvc Reference: System.Web.Abstractions 18.104.22.168 by Microsoft.Web.Mvc
You can see that System.Web.Mvc is referenced by 7 assemblies in my bin folder. Some reference version 22.214.171.124 and some version 126.96.36.199. I can now resolve any conflicts.
Color coding is used to more easily distinguish any problems.
- Green - referenced assembly found locally, in the specified directory
- Yellow - referenced assembly not found locally, but found installed in the Global Assembly Cache
- Red - referenced assembly missing