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 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.

Written by Abhith Rajan
Abhith Rajan is an aspiring software engineer with more than 8 years of experience and proven successful track record of delivering technology-based products and services.
Buy me a coffee

Was this helpful?

Show some ❤️

Share this page on Twitter to appear on the webmentions* 💡

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

Related SnippetsView All

Related ArticlesView All

Related VideosView All

Machine Learning for .NET Developers Introducing ML NET

20 Nuget packages that every .NET developer should be familiar with

Cleanup Transitive Dependencies in .NET with Snitch

Related StoriesView All