DependencyGraph.Core
0.5.1-nuke-support.1
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
This is a prerelease version of DependencyGraph.Core.
This package has a SemVer 2.0.0 package version: 0.5.1-nuke-support.1+7.
dotnet add package DependencyGraph.Core --version 0.5.1-nuke-support.1
NuGet\Install-Package DependencyGraph.Core -Version 0.5.1-nuke-support.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DependencyGraph.Core" Version="0.5.1-nuke-support.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DependencyGraph.Core" Version="0.5.1-nuke-support.1" />
<PackageReference Include="DependencyGraph.Core" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DependencyGraph.Core --version 0.5.1-nuke-support.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DependencyGraph.Core, 0.5.1-nuke-support.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DependencyGraph.Core@0.5.1-nuke-support.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DependencyGraph.Core&version=0.5.1-nuke-support.1&prerelease
#tool nuget:?package=DependencyGraph.Core&version=0.5.1-nuke-support.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
Allows you to create dependency graphs for .NET SDK-style projects. The most notable difference to other libraries providing such functionality is that dotnet-dependency-graph also includes transitive dependencies, thus creating a complete dependency graph.
Usage
// read project lock file (project.assets.json)
var lockFileFormat = new LockFileFormat();
var lockFile = lockFileFormat.Read("project.assets.json", NullLogger.Instance);
// create dependency graph with default options
var dependencyGraphFactory = new DependencyGraphFactory();
var graph = dependencyGraphFactory.FromLockFile(lockFile);
// print dependency graph to the console
IDependencyGraphVisualizer visualizer = new ConsoleDependencyGraphVisualizer(new ConsoleDependencyGraphVisualizerOptions());
await visualizer.VisualizeAsync(graph);
// create DGML file for the dependency graph
visualizer = new DgmlDependencyGraphVisualizer(new DgmlDependencyGraphVisualizerOptions("graph.dgml"));
await visualizer.VisualizeAsync(graph);
// exclude dependencies starting with "Microsoft" or "System"
dependencyGraphFactory = new DependencyGraphFactory(new DependencyGraphFactoryOptions { Excludes = ["Microsoft.*", "System.*"] });
graph = dependencyGraphFactory.FromLockFile(lockFile);
// only include dependencies starting with "YourCompany"
dependencyGraphFactory = new DependencyGraphFactory(new DependencyGraphFactoryOptions { Includes = ["YourCompany.*"] });
graph = dependencyGraphFactory.FromLockFile(lockFile);
// limit the graph depth
dependencyGraphFactory = new DependencyGraphFactory(new DependencyGraphFactoryOptions { MaxDepth = 2 });
graph = dependencyGraphFactory.FromLockFile(lockFile);
// modify console visualizer options
var consoleVisualizerOptions = new ConsoleDependencyGraphVisualizerOptions
{
IndentSize = 4, // specifiy indentation
Renderer = graphNode => graphNode.ToString(), // modify how the text for a graph node gets rendered
GetForegroundColor = // modify foregorund color
(graphNode, currentColor) => graphNode switch
{
ProjectDependencyGraphNode => ConsoleColor.Cyan,
PackageDependencyGraphNode => ConsoleColor.DarkMagenta,
_ => currentColor
},
GetBackgroundColor = // modify background color
(graphNode, currentColor) => currentColor
};
// modify DGML visualizer options
var dgmlVisualizerOptions = new DgmlDependencyGraphVisualizerOptions("graph.dgml")
{
Categories = // specify categories for the graph nodes
[
new DirectedGraphCategory
{
Id = "DefaultCategory",
Stroke = "Black",
Background = "DarkOrange"
}
],
AssignCategory = graphNode => "DefaultCategory" // assign a node to a category
};
For example outputs please see README.md of the dotnet tool.
Product | Versions 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. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- Microsoft.Build (>= 17.11.4)
- NuGet.ProjectModel (>= 6.12.1)
-
net8.0
- Microsoft.Build (>= 17.11.4)
- NuGet.ProjectModel (>= 6.12.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.5.1-nuke-support.1 | 2 | 12/4/2024 |