NDepend - a powerful .NET code analysis tool

Nearly a decade ago, I was amazed when a not-so-technical project manager gave detailed feedback on my C# code in a project I was working on. It turned out he had used FxCop to analyze the code and he was parroting the results that came out after the tool analyzed it. That was my first brush with code analysis tools.

This nifty class of tools is especially indispensable for architects, technical leads and solo programmers who are concerned about code quality and need to have code critically reviewed in order to avoid paying a technical debt. For architects and technical leads, having an automated tool can help them save time and cover a greater breadth of code to review for quality and any architecture flaws. For solo programmers who don't have the luxury of a peer to review their code (there is the StackExchange CodeReview forum but reviews may not be low-level or very comprehensive), these code analysis tools are a tremendous help to improve their craft.

NDepend (currently in version 4) is a powerful .NET code analysis tool that reveals a wealth of distilled information.  It can be used as a Visual Studio Add-in (for versions 2012, 2010 & 2008) or through a standalone Windows GUI app, VisualNDepend or via a console app.

Potential uses of NDepend include:


For someone completely new to code analysis tools, understanding the code metrics jargon can be intimidating. While NDepend has pretty detailed documentation, understanding the numerous keywords that are referenced by the tool can be a little daunting. If you put the effort to get past that, NDepend can pay rich dividends.

The man behind the tool, Patrick Smacchia, has been a Microsoft Visual C# MVP since 2003. In tune with the theme of NDepend, his blog is titled Code Better. He regularly answers questions on NDepend and related topics that are posted on StackOverflow.

To get started, try the free 14-day evaluation copy downloadable from the NDepend website. I was fortunate to have received a review copy from NDepend.

Comments