Architectural for .Net

Forums

Links and tips for visualizing code.

"C4": The four c's: Context (people), Containers, Components, Code

C4 with DrawIO: https://www.drawio.com/blog/c4-modelling

dotnet-project-graph (console app): https://github.com/KhaosCoders/dotnet-project-graph
 A dotnet global tool that prints a dependency tree of projects
 uses/references NuGet-package "OpenSoftware.DgmlBuilder"

DependencyVisualizer (console app): https://github.com/nkolev92/DependencyVisualizer
 Tool to create DGML files with mapping of both project and package (NuGet) references.
 This tool expects to find "project.assets.json" to get NuGet-references ("migrate packages.config to PackageReference")

Create Graphviz-DOT: https://github.com/aolszowka/MsBuildProjectReferenceDependencyGraph
 Utility to take a MsBuild Project File and generate a DOT Graph of all its ProjectReference Elements
 GitHub-version uses old .Net Core 3.1 but seems upgradable to .Net 8.

DependenSee: https://github.com/madushans/DependenSee
 Dotnet project and package dependency visualizer. (can create HTML and Graphviz DOT-files)
 GitHub-version is .Net 6 as of today (2025 september)

PlantUML generator: https://github.com/pierre3/PlantUmlClassDiagramGenerator
 Sample: PlantUmlClassDiagramGenerator.exe "C:\repo\solutionfolder" c:\_temp -dir -excludePaths "**/bin,**/obj,**/Properties" -allInOne -excludeUmlBeginEndTags -addPackageTags

https://plantuml.com/download

Graphviz for managing DOT-files: https://graphviz.gitlab.io/
 (there is not any visual UI for Graphviz, instead use some other software or extension for Visual Studio Code.)

DOT-file contents can be imported to DrawIO using menus "Arrange" / "Insert" / "Advanced" / "From Text" (and choosing diagram)

DgmlPowerTools 2022: https://marketplace.visualstudio.com/items?itemName=ChrisLovett.DgmlPowerTools2022
 DGML Power Tools is a VSIX package for Visual Studio 2022 that adds a bunch of handy new DGML related features.

Install the component "DGML Editor" from the "Visual Studio Installer" to be able to open DGML-files with Visual Studio:

 
Sample-solution that can be used for testing creation of DGML:
https://github.com/clovett/MyMoney.Net
 

-