VSGraph is a tool that generates graphs showing the structure of your Visual Studio solutions. In order to handle some of the complexities that can appear in your solution, VSGraph has some options to simplify the final diagram.
Merge Edges
By default, each of the dependency edges shown on the graph is drawn separately. This gives maximum detail, but at the
cost of some business in the diagram. The --merge-edges
option will merge arrows leaving or departing from the same
node at similar locations.
Here are two diagrams for the same project, the first without --merge-edges
:
And the second with --merge-edges
:
Remove Transitive Dependencies
One way to simplify a graph is by removing edges - if the edges you remove have little informational value, so much the better.
Specifying --remove-transitive-dependencies
removes edges from your diagram according to the following rule:
If node A references nodes B and C
and node B references node C
then remove the reference from A to C
This rule can dramatically simplify the generated diagram - compare this image with others for the same project shown above:
Hide Assemblies
In large projects, the sheer number of referenced framework assemblies can introduce a high level of noise into the generated diagram.
Specifying --hide-assemblies
allows you to select assemblies that won’t be shown on the final diagram.
Simplest use is to name the assembly to hide:
--hide-assemblies System
Or, you can specify a straightforward wildcard to hide all System.* assemblies:
--hide-assemblies System.*
If you want to hide both System.* and Microsoft.* you can do so as separate groups:
--hide-assemblies System.* --hide-assemblies Microsoft.*
Alternatively, you can give multiple wildcards in one go - just separate them with a semicolon (;
):
--hide-assemblies System;System.*;Microsoft.*