DependencyGraph 1.0.0
dotnet tool install --global DependencyGraph --version 1.0.0
dotnet new tool-manifest
dotnet tool install --local DependencyGraph --version 1.0.0
#tool dotnet:?package=DependencyGraph&version=1.0.0
nuke :add-package DependencyGraph --version 1.0.0
DependencyGraph
A cross-platform .NET global tool that scans a folder for .csproj files and exports their project and NuGet package dependencies as:
- a JSON document,
- an interactive HTML graph (powered by vis-network),
- or a flat HTML table.
It is useful to quickly understand how the projects of a solution (or a whole source tree) reference each other and which NuGet packages they consume.
Installation
Install it as a global .NET tool from a local .nupkg (produced by a Release build, see Building below) or from your NuGet feed:
# From a local package
dotnet tool install --global --add-source ./nupkg DependencyGraph
# From a configured NuGet feed
dotnet tool install --global DependencyGraph
Update or uninstall:
dotnet tool update --global DependencyGraph
dotnet tool uninstall --global DependencyGraph
Once installed, the command dependency-graph is available everywhere on your PATH.
Usage
dependency-graph --root <folder> --output <file> [--type json|html|table] [--tags "name=pattern;..."]
Options
| Option | Short | Required | Description |
|---|---|---|---|
--root |
-r |
yes | Root source folder to recursively scan for .csproj files. |
--output |
-o |
yes | Path to the output file that will receive the discovered dependency graph. |
--type |
-t |
no | Output format: json, html or table. Defaults to html. |
--tags |
no | Tag definitions used to classify projects by relative path (see below). |
Tagging projects
The --tags option lets you classify projects according to their relative path. A project gets a given tag when its relative path contains any of the associated patterns (case-insensitive substring match).
Format:
name1=pattern1,pattern2;name2=pattern3
Example:
dependency-graph -r ./src -o graph.html --tags "tests=test;tools=/tools;sample=sample,demo"
Examples
Generate an interactive HTML graph (default):
dependency-graph -r C:\Repos\MySolution -o graph.html
Generate a JSON file:
dependency-graph -r ./src -o graph.json -t json
Generate an HTML table:
dependency-graph -r ./src -o graph.html -t table
Building
To build and produce the NuGet package, run a Release build:
dotnet build -c Release
The .nupkg file is automatically generated in the ./nupkg folder thanks to GeneratePackageOnBuild being enabled only for the Release configuration.
You can also pack explicitly:
dotnet pack -c Release
Requirements
- .NET 10 SDK or later.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 66 | 5/28/2026 |