When working on large .NET solutions with dozens of projects, keeping track of project-to-project references gets messy fast. Built-in dependency diagrams in Visual Studio are either heavy or locked behind Enterprise licenses, and many existing tools haven't caught up with the newer XML-based .slnx solution format yet.
So, I built DGVisualizer — a lightweight, cross-platform desktop utility to inspect .slnx project dependencies interactively.
🔗 GitHub Repository: sabaka-chabaka/DGVisualizer
✨ What It Does
• Native .slnx Support: Parses solution structures and extracts dependencies asynchronously without freezing the UI.
• Automatic Layered Layout: Uses MSAGL (Microsoft Automatic Graph Layout) with Sugiyama layout settings to organize messy dependency trees into clean, readable layers.
• Interactive Canvas: Smooth panning and zooming (PanAndZoom), plus hover/click highlighting to trace direct dependencies while dimming unrelated nodes.
• Real-Time Node Dragging: You can drag project cards around to untangle dense areas, and the cubic Bezier curves + directional arrowheads recalculate dynamically.
🛠 Under the Hood: A Few Engineering Challenges
Building this on .NET 11 and Avalonia UI 12 came with a few interesting technical hurdles:
- Isolating MSBuild at Runtime
To accurately evaluate .csproj metadata, I used Microsoft.Build (ProjectRootElement) alongside Microsoft.Build.Locator. To avoid runtime DLL version conflicts with the host SDK, MSBuildLocator.RegisterDefaults() has to run early before any MSBuild types are loaded, paired with ExcludeAssets="runtime" on the Microsoft.Build packages.
- Bridging MSAGL and Avalonia Coordinate Spaces
MSAGL uses a standard Cartesian coordinate system where the Y-axis grows upwards, whereas Avalonia's Canvas uses top-down screen coordinates. Translating the layout meant inverting the Y-axis and adjusting surface normals so that Bezier control points and arrowheads attach cleanly to the borders of each project card.
- Keeping Drag-and-Drop Fast
Running a full MSAGL Sugiyama layout recalculation on every mouse move event would kill frame rates on big graphs. Instead, dragging a card triggers a localized recalculation (CalculateEdgeData) strictly for the edges connected to that specific node, keeping the UI responsive at 60+ FPS.
🚀 Try It Out & Contribute
If you're using .slnx in your projects or building desktop apps with Avalonia 12, I’d love for you to give it a spin!
What's next on my roadmap:
• Adding support for classic .sln files alongside .slnx.
• Detecting and highlighting circular dependencies.
Feedback, bug reports, and PRs are super welcome. If you find the tool useful, dropping a ⭐ on GitHub helps a lot!
What tools do you currently use to visualize or untangle dependencies in big .NET solutions? Let me know in the comments 👇