dotnet depends v0.1.0 has now been released. This is a tool for exploring dependencies in .NET projects, with an GUI heavily inspired from bitbake's depexp. Hopefully this tool will be a valuable addition to your toolbox when e.g. debugging transitive dependencies. Install it by running:
dotnet tool install --global dotnet-depends, and report any issues and/or feature requests on Github.
Ever since Dave Glick announced Buildalyzer, I knew I wanted to build something with it. I had been thinking about a dependency explorer, since you know, debugging transitive dependencies in .NET really sucks. It always takes a dozen of clicks on nuget.org and a couple of minutes scrolling up-and-down in
project.assets.json to figure out which dependency brought in package A, which in turn was incompatible with package B.
At first, when I started playing with Buildalyzer, I was determined that the tool should output a dependency graph in the DOT language, which in turn could be converted to SVG or PNG using graphviz. After a few attempts I came to the conclusion that the graphs easily became too messy and was hard to interpret. I was close to accept my defeat, when I remembered a great tool called
depexp which I had used with Yocto back in the days, when I was creating/tweaking embedded Linux distros (narrator: he still does, occasionally...).
Next problem then... Since I wanted this to be a .NET Core global tool, how do I introduce a GUI like
depexp in a .NET Core console application? I then remembered the console UI toolkit for .NET Miguel de Icaza announced. So, I took a dependency on Terminal.Gui / Gui.cs, and tweeted this:
Been playing with Buildalyzer and this is what I came up with. A simple dependency explorer for #dotnet. GUI influenced by bitbake's depexp and powered by gui.cs.— Martin Björkström (@mholo65) July 3, 2018
Source can be found here: https://t.co/eJqSgjQ2ky pic.twitter.com/7DbESQUs75
Feedback was awesome, so I submitted a couple of PR's to Gui.cs and awaited Buildalyzer v1.0.0 before releasing v0.1.0 of
Curious to see how it works? Install it by running:
dotnet tool install --global dotnet-depends, and then run
dotnet depends /path/to/myproject.csproj. If your project targets multiple frameworks, you can specify the target by appending the
-f|--framework <FRAMEWORK> option. Please remember to report any issues and/or feature requests on Github. Happy hacking!