Go Back

Introducing MsBuildProjectReferenceDependencyGraph (Visualize Large Dependency Trees)

Any project of interest most likely has several dependent projects. In MsBuild Project Format this is usually indicated by the ProjectReference Tag (https://github.com/Microsoft/msbuild/blob/master/documentation/ProjectReference-Protocol.md). When working in a deep/complex dependency tree it is helpful to understand why certain projects might be getting pulled in or what the dependency tree looks like.

Introducing MsBuildProjectReferenceDependencyGraph a simple command line utility to take a MsBuild Project Format File, Parse it for ProjectReferences (along with N-Order Dependencies), and Produce DOT Graph Format Output.

This DOT Graph (or digraph) can then be put into various Visualizers that support the DOT Graph Format (Including GraphViz (https://graphviz.gitlab.io/) or WebGraphViz (http://www.webgraphviz.com/)).

Thankfully because the Traditional Synergy to Visual Studio Project Format Follows the standard MsBuild Project Format this tool is useful to us just the same as C# and Synergy.NET Developers.

Usage
MsBuildProjectReferenceDependencyGraph.exe OrderEntry.synproj > out.g

Because the output is simply piped to Standard Out we redirect standard out to an output file for further processing by other utilities.

For example this file was processed by GraphViz to produce this PNG (names have been sanitized)

Output of Utility Visualized via GraphViz 

The tool is open sourced and MIT Licensed, I am willing to take pull requests as well! https://github.com/aolszowka/MsBuildProjectReferenceDependencyGraph
 

4 Answers
1   | Posted by Ace Olszowka to Other on 8/27/2018 5:32 PM
Best Answer chosen by Ace Olszowka
Ace Olszowka
Show us your trees!

8/27/2018 6:03 PM   0  
Ace Olszowka
The tool now has an anonymize switch to quickly hide your project names for sharing graphs more easily.

8/30/2018 12:48 AM   0  
Marty Lewis
Definitely a cool tool! Using the digraph format was a smart move to let other tools do the rendering.

User-added image

Here is SDI in anonymized form. 

8/30/2018 4:04 PM   0  
Ace Olszowka
The tooling now supports SLN Files

10/26/2018 1:52 PM   0  
Please log in to comment or answer this question.