dotnet | ide | c-sharp

NDepend - The Best-in-class Static Code Analyzer for Dotnet

NDepend is my favorite static code analyzer for dotnet. Check how I use it.

Abhith Rajan
Abhith RajanDecember 09, 2020 · 3 min read · Last Updated:

If you check my about page, I have mentioned that,

My role involves prototyping, developing backend as well as front end apps with modern workflows, frameworks. Keeping an eye on the patterns and organized code.

To keep the code organized and to make sure the quality is met, I depend on NDepend.

NDepend is the best-in-class static code analyzer for dotnet. And the best come with a price too, i.e it’s a PAID tool. Someone was kind enough to send me a licensed version.

When I tried NDepend the first time, it was overwhelming, the amount of information it throws out after analysis was too much 😲. Still am exploring many sides of the information it shares. In this post, I will share how I use it and the areas where it helps.

Initial Setup

Once you download the package, getting started is easy. Run the app and its Start page got everything you need to get started,

Start Page
Start Page

In my case, I installed the visual studio extension. With that, you can easily attach a new or existing NDepend project with the opened solution.

Eh, what is an NDepend project?

This is mentioned in their getting started docs.

👉 Getting Started with NDepend

  • A NDepend project can be attached to several Visual Studio solutions.
  • This is useful if you wish to analyze several .NET assemblies compiled with several Visual Studio solutions.
  • A benefit will be the possibility to navigate across several Visual Studio solutions opened in several Visual Studio instances.

Once the initial setup and first analysis of the project are done, you will be presented with the analysis report. And it will be part of its dashboard.

Dashboard

I love metrics and staring at them is one of my hobbies. So do I love the NDepend dashboard since it shows all the metrics nicely.

Dashboard Metrics
Dashboard Metrics

Want to check how the code evolved compared to a previous date? Just choose the baseline to any previous analysis date.

Different Baseline Metrics
Different Baseline Metrics

Want some charts?

Here we go. Following are the default ones ready for you to see the trend.

Dashboard Trend Charts
Dashboard Trend Charts

Noticed the Create Trend Chart?

We can create more trend charts as per our needs and metrics can be selected from a categorized list. In which one category I like is the Third-Party Usage,

Third-Party Usage Trend
Third-Party Usage Trend

So far, I just scratched the surface of the Ndepend tool only. More about it is on the way.

In the meantime check out these great articles about NDepend, which share a lot (really, a lot) about its features.

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub


Abhith Rajan

Written byAbhith Rajan
Abhith Rajan is a software engineer by day and a full-stack developer by night. He's coding for almost a decade now. He codes 🧑‍💻, write ✍️, learn 📖 and advocate 👍.
Connect

Is this page helpful?

Related SnippetsView All

Related ArticlesView All

Related VideosView All

Performance Improvements in .NET 9

The Community’s Top WebStorm Tips and Tricks

Customizing WebStorm: Best Themes, Plugins, and Settings

Related Tools & ServicesView All

dotnet.microsoft.com

Try .NET | Runnable .NET code on your site

Try .NET is a service that allows you to embed runnable .NET code snippets into your website, blog, or documentation. Go beyond copy and paste samples to live snippets.
vscode.dev

Visual Studio Code for the Web

Build with Visual Studio Code, anywhere, anytime, entirely in your browser.