ReadDotNet

Analyse .NET code: C# and Visual Basic.

Process a list of sln, csproj, vbproj, shproj, cs, vb, dll and exe files.

Expected usage: DeepEnds ReadDotNet <options> filenames
<options> available:
      --extract              Default(coupling). Whether to perform a coupling,
                               cohesion or callgraph analysis
      --output               Required. Path of DGML file (*.dgml) for Visual
                               Studio
      --externals            Default(true). Whether to write the links to the
                               sources
      --reflect              Default(true). Whether to extract public classes,
                               etc. from assemblies in a coupling analysis
      --configPlatform       Default(Debug|Any). Visual Studio build
                               configuration and platform

Examples:
  DeepEnds ReadDotNet --output=C:\Results\Constructor.dgml C:\Source\Constructor.cs
      - read a C# file to produce a coupling graph
  DeepEnds ReadDotNet --output=C:\Results\Constructor2.dgml --extract=cohesion C:\Source\Constructor2.cs
      - read a C# file to produce a cohesion graph
  DeepEnds ReadDotNet --output=C:\Results\Reflect.dgml C:\Source\System.dll
      - read a .NET assembly to produce a coupling graph
  DeepEnds ReadDotNet --output=C:\Results\SharedProject.dgml C:\Source\Shared.sln
      - read a Visual Studio solution file to produce a coupling graph
  DeepEnds ReadDotNet --output=C:\Results\Constructor.dgml C:\Source\Constructor.vb
      - read a Visual Basic .NET file to produce a coupling graph

If reading the code for a coupling analysis then the namespaces, enumerants, classes, structures, etc. are extracted into a nested node structure where individual leaf nodes are joined based on whether they reference each other.

If reading the code for a cohesion analysis then the namespaces, classes, structures, etc. are extracted into a nested node structure where individual member variables and methods are joined based on whether they reference each other.

The resulting DGML file can be viewed in Visual Studio where, if externals was set to true, right clicking on a node will produce a pop up menu with the option to Go To Reference that will open the relevant source code. Any unused node should be shaded in pastel yellow. Alternatively it can be processed in other tools.

For a coupling analysis setting the decompile option to true will additionally extract nodes from any references (dll and exe files).