DependencyGraph.App 0.5.1-nuke-support.1

This is a prerelease version of DependencyGraph.App.
This package has a SemVer 2.0.0 package version: 0.5.1-nuke-support.1+7.
dotnet tool install --global DependencyGraph.App --version 0.5.1-nuke-support.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local DependencyGraph.App --version 0.5.1-nuke-support.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DependencyGraph.App&version=0.5.1-nuke-support.1&prerelease
                    
nuke :add-package DependencyGraph.App --version 0.5.1-nuke-support.1
                    

About

Nuget

Allows you to create dependency graphs for .NET SDK-style projects. This is the .NET Global Tool allowing usage of dependency-graph from the command line. The most notable difference to other tools providing such functionality is that dotnet-dependency-graph also includes transitive dependencies, thus creating a complete dependency graph.

Usage

Installation

dotnet tool install --global DependencyGraph.App

After installation, the tool can be called with the command dependency-graph. Per default, dotnet-dependecy-graph will look for a project file in the current directory, restore the project and print its dependencies to the console. For example, the call of

dependency-graph

for the project DependencyGraph.App will print the following output to the console

DependencyGraph.App
   net8.0
      DependencyGraph.Core
         NuGet.ProjectModel@6.8.0
            NuGet.DependencyResolver.Core@6.8.0
               NuGet.Configuration@6.8.0
                  NuGet.Common@6.8.0
                     NuGet.Frameworks@6.8.0
                  System.Security.Cryptography.ProtectedData@4.4.0
               NuGet.LibraryModel@6.8.0
                  NuGet.Common@6.8.0
                     NuGet.Frameworks@6.8.0
                  NuGet.Versioning@6.8.0
               NuGet.Protocol@6.8.0
                  NuGet.Packaging@6.8.0
                     Newtonsoft.Json@13.0.3
                     NuGet.Configuration@6.8.0
                        NuGet.Common@6.8.0
                           NuGet.Frameworks@6.8.0
                        System.Security.Cryptography.ProtectedData@4.4.0
                     NuGet.Versioning@6.8.0
                     System.Security.Cryptography.Pkcs@6.0.4
                        System.Formats.Asn1@6.0.0
      GitVersion.MsBuild@5.12.0
      Microsoft.Extensions.Hosting@8.0.0
...

You can also explicitly specify a project file:

dependency-graph .\DependencyGraph.App\DependencyGraph.App.csproj

Use the DGML visualizer

Printing large dependency graphs to the console can be hard to comprehend. A better option may be to use the DGML visualizer. It creates a DGML file that can be viewed in Visual Studios DGML viewer. To use the DGML visualizer use the -v dgml or --visualizer dgml option. In this case, you must also specify an output file. The command

dependency-graph .\DependencyGraph.App\DependencyGraph.App.csproj -v dgml -o DependencyGraph.App.dgml

creates a dependency graph for the DependencyGraph.App project and writes it to the file DependencyGraph.App.dgml. The result may look like the following image:

Dependency graph of the DependencyGraph.App visualized using the DGML visualizer

Exclude dependencies

Sometimes dependency graphs can get quite big and confusing. With the option -e or --exclude you can exclude dependencies from being added to the resulting dependency graph. For example, the command

dependency-graph -e Microsoft.* System.*

will exclude all dependencies that start with Microsoft. or System. from the resulting graph.

Explicitly include dependencies

Another possibility to create smaller and clearer dependency graphs is to use the -i or --include option. It allows to specify patterns for dependencies that should be included in the graph. All other dependencies will be omitted. For example, if you want to find out your dependencies on packages from your company, you can use the following command:

dependency-graph -i YourCompany.*

Limit graph depth

You can limit the graph depth by specifying the option -d or --max-depth. For example, the command

dependency-graph -d 2

will limit the depth of the resulting graph to 2.

Show help

dependency-graph -h
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.5.1-nuke-support.1 2 12/4/2024