NDepend - Improved Dependency Graph Feature


This is another post related to the NDepend tool and Code Quality for .NET Core application follow by this

NDepend makes .NET code beautiful by measuring quality with metrics, generate diagrams, and enforce decisions with code rules, right in Visual Studio.

I have used this tool for analyzing the .NET Core project and it is a great and intuitive tool to work with. The new version NDepend  v2020.1.0 is available with the latest features e.g.  Dependency Graph Completely Rebuilt

What is new with the Dependency Graph

I have also used the Dependency Graph in the previous version of the NDepend. It was much useful to identify the dependency between the different assemblies in the solution.

This time the NDepend team improvise this feature and restructured to analyze large project architecture. Below features make it easy to analyze using the dependency graph.

New navigation system

You can drag and drop from Visual Studio solution explorer, Expand/Collapse parent elements, Search elements in graphs by name with the search windows, also provided Undo / Redo feature.

New layout options

  • Group-By Assemblies, Namespaces, Types, Clusters Filters to show or hide
  • Box size proportional to element size, Edge width proportional to the coupling strength
  • Color conventions instantly identify caller/callee elements
  • Complex graph simplified with Clusters
  • Export to SVG vector format or PNG bitmap format.

Let's explorer that how can we generate Dependency Graph by taking an example of the OrchardCore application which contains more than 143 projects. 

Open the application in the Visual Studio and create an NDepend project by attached to the Visual Studio solution.

Filter and select the project that you want to analyze.

Now a dialog box will open with options, View NDepend Dashboard, Show NDepend Interactive Dependency Graph. Click on the "Show NDepend Interactive Dependency Graph" button to see the dependency graph.

After a few seconds windows will open which is shown in the image below. It has the relationship between the projects and their dependencies.

You can also zoom in or out of the dependency graph to see a group of objects. See the below screenshot to know the zoom feature. you can move and see the project elements.


I genuinely think NDepend is very powerful and very easy to use for analyzing application architecture. The NDepend team and Patrick are very active and we can expect a lot of good improvements in future versions which help to create quality software.