Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Free dependency graph of visual studio C# project

I'm looking to map the C# classes of my Visual Studio 2019 project on a dependency graph. I've seen some tools available but they require you to pay for a full version (ReSharper, NDepend). I'm looking for something free/cheap. If anyone has ideas, please let me know.

like image 615
Anto098 Avatar asked Jan 25 '23 00:01

Anto098


1 Answers

I have recently made a dotnet tool for this if you're interested.

Try DependenSee

It doesn't integrate with VS, but you can visualize the dependencies in an html file (also support XML, JSON and writing out results to console.)

to install

  • Make sure you have dotnet 5 runtime installed

  • Make sure you have dotnet 6 runtime installed

  • run dotnet tool install dependensee --global

  • once installed, run dependensee "path/to/root/of/csproj/files" "path/to/output.html"

  • By default it doesn't include nuget packages, but can be enabled with -P switch

  • to see all options, run dependensee with no args.

HTML output looks like this

DependenSee Graph

For Continuous Integration Scenarios

There are command line options allowing you to output XML or JSON for further processing, either writing them to a file or writing to Standard Output allowing to pipe the output to other command line tools without touching the filesystem if necessary.

like image 168
Madushan Avatar answered Jan 29 '23 08:01

Madushan