ProjGraph.Lib.Core
1.0.1
dotnet add package ProjGraph.Lib.Core --version 1.0.1
NuGet\Install-Package ProjGraph.Lib.Core -Version 1.0.1
<PackageReference Include="ProjGraph.Lib.Core" Version="1.0.1" />
<PackageVersion Include="ProjGraph.Lib.Core" Version="1.0.1" />
<PackageReference Include="ProjGraph.Lib.Core" />
paket add ProjGraph.Lib.Core --version 1.0.1
#r "nuget: ProjGraph.Lib.Core, 1.0.1"
#:package ProjGraph.Lib.Core@1.0.1
#addin nuget:?package=ProjGraph.Lib.Core&version=1.0.1
#tool nuget:?package=ProjGraph.Lib.Core&version=1.0.1
ProjGraph.Lib.Core
Core abstractions, parsers, and infrastructure for analyzing .NET solutions, projects, and source files.
Installation
dotnet add package ProjGraph.Lib.Core
Overview
ProjGraph.Lib.Core is the shared infrastructure layer for the ProjGraph library ecosystem. It provides:
- Solution & project parsers for
.sln,.slnx, and.csprojfiles via MSBuild - Dependency injection extension methods for service registration
- Abstractions (
IProjectParser,ISolutionParser,IDiagramRenderer,IFileSystem, …) - Infrastructure services (
CompilationFactory,ProjectDiscoveryService,PhysicalFileSystem, …) - Graph algorithms (Tarjan's SCC for cycle detection)
This package is the foundation for all other ProjGraph.Lib.* packages. It is not usually referenced
on its own — use a purpose-specific package instead:
ProjGraph.Lib.DependenciesProjGraph.Lib.ClassDiagramProjGraph.Lib.EntityFrameworkProjGraph.Lib— meta-package (all of the above)
Usage
Register all core services:
using ProjGraph.Lib.Core;
services.AddProjGraphCore();
Parse a solution
using Microsoft.Extensions.DependencyInjection;
using ProjGraph.Lib.Core;
using ProjGraph.Core.Models;
var services = new ServiceCollection();
services.AddProjGraphCore();
var provider = services.BuildServiceProvider();
var parser = provider.GetRequiredService<ISolutionParser>();
IReadOnlyList<Project> projects = await parser.ParseAsync("MySolution.slnx");
Key Abstractions
| Interface | Description |
|---|---|
ISolutionParser |
Parses .sln / .slnx into a list of Project models |
IProjectParser |
Parses a single .csproj file |
IProjectDiscoveryService |
Discovers all projects under a directory |
ICompilationFactory |
Creates Roslyn Compilation objects from project files |
IDiagramRenderer<T> |
Generic renderer producing a string diagram from a model |
IFileSystem |
Abstraction over System.IO for testability |
IOutputConsole |
Abstraction over console output (Spectre.Console-backed by default) |
Links
| 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
- Microsoft.Build (>= 18.4.0)
- Microsoft.CodeAnalysis.CSharp (>= 5.3.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- ProjGraph.Core (>= 1.0.1)
- Spectre.Console (>= 0.54.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on ProjGraph.Lib.Core:
| Package | Downloads |
|---|---|
|
ProjGraph.Lib.Dependencies
Project dependency graph analysis, solution statistics, and ASCII/Mermaid rendering for .NET solutions. |
|
|
ProjGraph.Lib.ClassDiagram
Roslyn-powered class hierarchy analysis and Mermaid class diagram generation for .NET projects. |
|
|
ProjGraph.Lib.EntityFramework
Entity Framework Core DbContext and ModelSnapshot analysis with Mermaid ERD generation for .NET projects. |
GitHub repositories
This package is not used by any popular GitHub repositories.