• Stars
    star
    651
  • Rank 69,175 (Top 2 %)
  • Language
    C#
  • License
    MIT License
  • Created almost 14 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple command line assembly reference checker

Build status

AsmSpy

A simple command line tool to view assembly references.

Install

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).

AsmSpy D:\Source\sutekishop\Suteki.Shop\Suteki.Shop\bin

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.

Switches:

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 <filename>
dgml version Show the assembly version on the label.
Supported formats: -dgsv, --dgshowversion
dot Export dependency graph to a DOT file.
Supported formats: -dt <filename>
xml Export dependency graph to a xml file.
Supported formats: -x <filename>
rsw Will only analyze assemblies if their referenced assemblies starts with the given value.
Supported formats: -rsw <string>, --referencedstartswith <string>
e Will exclude assemblies if they start with the given value. This option can be provided multiple times.
Supported formats: -e <string>, --exclude <string>
tree Write a dependency tree to the console.
Supported formats: -tr --tree
treedepth Limit tree depth (in compbinaison with --tree). Supported formats : -trd <int> --treedepth <int>
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 <string>, --configurationFile <string>
f Whether to exit with an error code when AsmSpy detected Assemblies which could not be found
Supported formats. -f, --failOnMissing

Examples

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:

AsmSpy D:\Source\sutekishop\Suteki.Shop\Suteki.Shop\bin\Suteki.Shop.dll

To 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.Mvc

You 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.

  • 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

Configure AsmSpy as an external tool in Visual Studio

Blog post here

More Repositories

1

gtr-cof

Interactive music theory dashboard for guitarists. http://guitardashboard.com/
TypeScript
331
star
2

Mike.MQShootout

Let's play with MQs
C#
136
star
3

WebStresser

A very simple .NET web stress tool
C#
58
star
4

NetOnKubernetes

Simple .NET http service example for hosting on Kubernetes.
C#
45
star
5

Suteki.TardisBank

Pocket money on-line banking for parents and kids.
C#
41
star
6

Suteki.Monads

Let's play monads!
C#
38
star
7

sutekishop

A .NET eCommerce application
C#
27
star
8

EasyNetQTest

A simple sample application for EasyNetQ. Used in the Quick Start guide.
C#
27
star
9

Journeys

A fun coding challenge.
C#
20
star
10

FunctionalDemo

Programming functional style in C#, only using static methods.
C#
12
star
11

MefAreas

A simple take on a plug-in architecture for asp.net mvc
JavaScript
10
star
12

Mike.AsyncWcf

Let's play with Async WCF
C#
8
star
13

ProtobufSerializer

A simple of example of how to use Google.Protobuf without code generation
C#
6
star
14

Mike.DistributedLua

A sample using Lua as a distributed workflow scripting language
C#
5
star
15

mikehadlow.github.io

My Homepage
HTML
5
star
16

Mike.Spikes

A bucket for experiments and demos
C#
5
star
17

dillinger

4
star
18

Suteki.AsyncMvcTpl

ASP.NET MVC and Task Parallel Library Sample
C#
4
star
19

ubuntu-monoxide-mono-devel

Dockerfile for directhex/monoxide mono-devel package on Ubuntu 3.10
Shell
4
star
20

RmqBindingTest

Producer consumer pair to test large numbers of bindings on RabbitMQ
C#
4
star
21

NetSourceProjectBuilder

A utility to build project files from the published .NET 4.0 source code
C#
4
star
22

Mike.EasyNetQDemo

A little console demo of EasyNetQ
C#
2
star
23

QueueSpy

Simple cloud monitoring for RabbitMQ
C#
2
star
24

FlashMyPi

Make the LED matrix on Raspberry Pi flash.
C#
2
star
25

RedisStreamReader

Demonstration of how to do a blocking XREAD on a Redis stream using the StackExchange.Redis library.
C#
2
star
26

blog

Mike Hadlow's Blog
HTML
1
star
27

socsnap

Social twitter based photo booth
C#
1
star
28

FifteenBelow.Rmon

Rmon: Monitoring for RabbitMQ
JavaScript
1
star