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
<PackageReference Include="ProjGraph.Lib.Dependencies" Version="1.0.1" />
<PackageVersion Include="ProjGraph.Lib.Dependencies" Version="1.0.1" />
<PackageReference Include="ProjGraph.Lib.Dependencies" />
paket add ProjGraph.Lib.Dependencies --version 1.0.1
#r "nuget: ProjGraph.Lib.Dependencies, 1.0.1"
#:package ProjGraph.Lib.Dependencies@1.0.1
#addin nuget:?package=ProjGraph.Lib.Dependencies&version=1.0.1
#tool nuget:?package=ProjGraph.Lib.Dependencies&version=1.0.1
ProjGraph.Lib.Dependencies
Project dependency graph analysis, solution statistics, and ASCII/Mermaid rendering for .NET solutions.
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 diagram —
graph TDformat 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
Links
- GitHub Repository
- Documentation
- CLI tool —
projgraph visualize
| 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. |
-
net10.0
- ProjGraph.Lib.Core (>= 1.0.1)
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.