ProjGraph.Lib.Dependencies 1.0.1

dotnet add package ProjGraph.Lib.Dependencies --version 1.0.1
                    
NuGet\Install-Package ProjGraph.Lib.Dependencies -Version 1.0.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="ProjGraph.Lib.Dependencies" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ProjGraph.Lib.Dependencies" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ProjGraph.Lib.Dependencies" />
                    
Project file
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 ProjGraph.Lib.Dependencies --version 1.0.1
                    
#r "nuget: ProjGraph.Lib.Dependencies, 1.0.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 ProjGraph.Lib.Dependencies@1.0.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=ProjGraph.Lib.Dependencies&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ProjGraph.Lib.Dependencies&version=1.0.1
                    
Install as a Cake Tool

ProjGraph.Lib.Dependencies

Project dependency graph analysis, solution statistics, and ASCII/Mermaid rendering for .NET solutions.

NuGet License: MIT

Installation

dotnet add package ProjGraph.Lib.Dependencies

Overview

ProjGraph.Lib.Dependencies analyzes .NET solution and project files to build a dependency graph and compute solution-level statistics. It renders the result as:

  • ASCII tree — human-readable console output
  • Flat list — simple project list
  • Mermaid diagramgraph TD format for embedding in Markdown, wikis, or documentation sites

NuGet package references can optionally be included in the graph alongside project references.

Usage

Register all services:

using ProjGraph.Lib.Core;
using ProjGraph.Lib.Dependencies;

services.AddProjGraphCore();
services.AddProjGraphDependencies();

Generate a Mermaid graph

using ProjGraph.Core.Models;
using ProjGraph.Lib.Dependencies.Application;
using ProjGraph.Lib.Dependencies.Rendering;

var graphService = provider.GetRequiredService<IGraphService>();

var result = await graphService.BuildGraphAsync("MySolution.slnx", includePackages: false);
var renderer = provider.GetRequiredService<MermaidGraphRenderer>();
string diagram = renderer.Render(result);

Example output:

graph TD
    MyApp.Web --> MyApp.Core
    MyApp.Infrastructure --> MyApp.Core

Compute solution statistics

var statsService = provider.GetRequiredService<IStatsService>();
var stats = await statsService.ComputeStatsAsync("MySolution.slnx");

Console.WriteLine($"Projects : {stats.ProjectCount}");
Console.WriteLine($"Packages : {stats.PackageCount}");
Console.WriteLine($"Dependencies: {stats.DependencyCount}");

Key Services

Service Description
IGraphService Builds the full dependency graph for a solution or project file
IStatsService Computes aggregate metrics for a solution
MermaidGraphRenderer Renders a graph as a Mermaid graph TD diagram
TreeGraphRenderer Renders a graph as an ASCII dependency tree
FlatGraphRenderer Renders a graph as a flat list

Supported Input Formats

.sln · .slnx · .csproj

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ProjGraph.Lib.Dependencies:

Package Downloads
ProjGraph.Lib

Meta-package that bundles all ProjGraph libraries: project graph, class diagram, and Entity Framework analysis with a single DI registration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 33 4/4/2026
1.0.0 98 3/12/2026