NDepend
title: "NDepend" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["static-program-analysis-tools", ".net-programming-tools", "software-metrics"] topic_path: "technology/software-engineering" source: "https://en.wikipedia.org/wiki/NDepend" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::data[format=table title="Infobox Software"]
| Field | Value |
|---|---|
| logo | NDepend.jpg |
| name | NDepend |
| developer | NDepend |
| latest_release_version | 2025.1 |
| operating_system | Windows |
| genre | Software quality |
| license | Commercial, Proprietary |
| website | |
| :: |
| logo = NDepend.jpg | screenshot = | caption = | name = NDepend | developer = NDepend | latest_release_version = 2025.1 | operating_system = Windows | genre = Software quality | license = Commercial, Proprietary | website = NDepend is a static analysis tool for C# and .NET code to manage code quality and security. The tool proposes a large number of features, from CI/CD Web Reporting to Quality Gate and Dependencies Visualization. For that reason, the community refers to it as the "Swiss Army Knife" for .NET Developers.
Features
::figure[src="https://upload.wikimedia.org/wikipedia/commons/8/8d/ReportBig2023-Issue.png" caption="NDepend Report Source Files List" alt="NDepend Report Source Files List"] ::
::figure[src="https://upload.wikimedia.org/wikipedia/commons/b/b0/ReportBig2023-Source.png"] ::
::figure[src="https://upload.wikimedia.org/wikipedia/commons/6/68/ClassDependents2.png" alt="NDepend Dependency Graph"] ::
The main features of NDepend are:
- Interactive Web Reports about all Aspects of .NET Code Quality and Security Sample Reports Here. Reports can be built on any platform: Windows, Linux and MacOS
- [Roslyn Analyzers Issues Import https://www.ndepend.com/docs/reporting-roslyn-analyzers-issues]
- Quality Gates
- CI/CD Integration with Azure DevOps, GitHub Action, Bamboo, Jenkins, TeamCity, AppVeyor
- Dependency Visualization (using dependency graphs, and dependency matrix)
- Smart Technical Debt Estimation
- Declarative code rule over C# LINQ query (CQLinq).
- Software Metrics (NDepend currently supports more than 100 code metrics: Cyclomatic complexity; Afferent and Efferent Coupling; Relational Cohesion; Google page rank of .NET types; Percentage of code covered by tests, etc.)
- Code Coverage data import from Visual Studio coverage, dotCover, OpenCover, NCover, NCrunch.
- All results are compared against a baseline allowing the user to focus on newly identified issues.
- Integration with Visual Studio 2022, 2019, 2017, 2015, 2013, 2012, 2010, or can run as a standalone through VisualNDepend.exe, side by side with JetBrains Rider or Visual Studio Code.
Code rules through LINQ queries (CQLinq)
::figure[src="https://upload.wikimedia.org/wikipedia/commons/0/0e/CQLinq_Overview.png" alt="NDepend Code Querying CQLinq"] ::
Live code queries and code rules through LINQ queries is the backbone of NDepend, all features use it extensively. Here are some sample code queries:
- Base class should not use derivatives:
::code[lang=csharp] // Base class should not use derivatives warnif count > 0 from baseClass in JustMyCodeTypes where baseClass.IsClass && baseClass.NbChildren > 0 // <-- for optimization! let derivedClassesUsed = baseClass.DerivedTypes.UsedBy(baseClass) where derivedClassesUsed.Count() > 0 select new { baseClass, derivedClassesUsed } ::
- Avoid making complex methods even more complex (source code cyclomatic complexity):
::code[lang=csharp] // Avoid making complex methods even more complex (source code cyclomatic complexity) warnif count > 0 from m in JustMyCodeMethods where !m.IsAbstract && m.IsPresentInBothBuilds() && m.CodeWasChanged() let oldCC = m.OlderVersion().CyclomaticComplexity where oldCC > 6 && m.CyclomaticComplexity > oldCC select new { m, oldCC, newCC = m.CyclomaticComplexity, oldLoc = m.OlderVersion().NbLinesOfCode, newLoc = m.NbLinesOfCode, } ::
Additionally, the tool provides a live CQLinq query editor with code completion and embedded documentation.
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::