home | software | .net dependency analyser
After manually drawing an assembly dependency graph for a twenty-something project solution, I tackled the task of doing this in software. The application I wrote is available here for public use. Hopefully if people people make modifications, they'll send them to me.
Run the application, and open a .NET assembly from the File|Open menu (or just press CTRL+O). The analyser will immediately generate a diagram such as the one shown.

Most assemblies will reference large numbers of system assemblies, either directly or indirectly. In this graph, both the System and mscorlib assemblies are referenced by almost all other assemblies. The diagram is clearer without these explicit references.
See this graph, exported as a PNG file.

Check any assemblies that don't add any value to the graph. Once this is done, refresh the plot either via the View menu, or by pressing F5.

This plot tells us a great deal about the analysed assembly (in this case, Drew.Controls.Map.dll). It requires 3 non-system assemblies: Drew.Types, Drew.Util and nunit.framework, even though nunit.framework is no referenced directly. We can also tell, unsurprisingly, that Drew.Controls.Map uses WinForms assemblies.
Note the circular dependency between System and System.Xml!!!
Excluding all System assemblies shows all dependent assemblies that must be deployed with the selected assembly for it to operate properly.

Here's an example of the SVG output.
The graph is produced via a Dot script. WinGraphViz is a COM component that generates Dot images, and is used by this application. It must be installed for the .NET dependency analyser to work.
A Dot script may look something like this:
This markup can be seen in the 'Dot Output' tab.
More information on Dot can be found at http://www.graphviz.org/
dot-net-dependency-analyser-1.0-release.zip (362KB) - Binaries (no source) including WinGraphViz installer
dot-net-dependency-analyser-1.0-source.zip (43KB) - Full source code (no binaries or WingraphViz installer) - Solution uses VS.NET 2003
WinGraphviz_v1.02.17.msi (389KB) - The WingraphViz installer (required to run the dependency analyser)
System.*