Simple command line assembly reference checker
Many thanks to Oleg for taking on AsmSpy!
A simple command line tool to view assembly references.
Install from Chocolatey package:
C:\> choco install asmspyOr download AsmSpy as a .zip here. The .zip file contains AsmSpy.exe.
Simply run AsmSpy giving it a path to your bin directory (the folder where your project's assemblies live).
AsmSpy D:\Source\sutekishop\Suteki.Shop\Suteki.Shop\binIt 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.
| Switch | Description |
|---|---|
| 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 \ | |
| dgml version | Show the assembly version on the label. |
| Supported formats: -dgsv, --dgshowversion | |
| dot | Export dependency graph to a DOT file. |
| Supported formats: -dt \ | |
| xml | Export dependency graph to a xml file. |
| Supported formats: -x \ | |
| rsw | Will only analyze assemblies if their referenced assemblies starts with the given value. |
| Supported formats: -rsw , --referencedstartswith \ | |
| e | Will exclude assemblies if they start with the given value. This option can be provided multiple times. |
| Supported formats: -e , --exclude \ | |
| tree | Write a dependency tree to the console. |
| Supported formats: -tr --tree | |
| treedepth | Limit tree depth (in compbinaison with --tree). Supported formats : -trd \ --treedepth \ |
| treelabel | Add [Level n] label in tree view of dependencies. Supported formats -trl --treelabel |
| i | Include subdirectories in search. |
| Supported formats: -i, --includesub | |
| c | Use the binding redirects of the given configuration file (Web.config or App.config) |
| Supported formats: -c , --configurationFile \ | |
| f | Whether to exit with an error code when AsmSpy detected Assemblies which could not be found |
| Supported formats. -f, --failOnMissing |
To see a list of all assemblies and all references, just add the 'all' flag:
AsmSpy D:\Source\sutekishop\Suteki.Shop\Suteki.Shop\bin --allTo check only a single assembly provide a path to the file:
AsmSpy D:\Source\sutekishop\Suteki.Shop\Suteki.Shop\bin\Suteki.Shop.dllTo ignore system assemblies, add the 'nonsystem' flag.
The output looks something like this:
Reference: System.Runtime.Serialization
3.0.0.0 by Microsoft.ServiceModel.Samples.XmlRpc
3.0.0.0 by Microsoft.Web.Mvc
4.0.0.0 by Suteki.Shop
Reference: System.Web.Mvc
2.0.0.0 by Microsoft.Web.Mvc
3.0.0.0 by MvcContrib
3.0.0.0 by MvcContrib.FluentHtml
3.0.0.0 by Suteki.Common
2.0.0.0 by Suteki.Common
3.0.0.0 by Suteki.Shop
2.0.0.0 by Suteki.Shop
Reference: System.ServiceModel.Web
3.5.0.0 by Microsoft.Web.Mvc
Reference: System.Web.Abstractions
3.5.0.0 by Microsoft.Web.MvcYou can see that System.Web.Mvc is referenced by 7 assemblies in my bin folder. Some reference version 2.0.0.0 and some version 3.0.0.0. I can now resolve any conflicts.
Color coding is used to more easily distinguish any problems.
No open issues yet, or sync has not completed.