Click here to Skip to main content
15,867,594 members
Articles / Plugin

Getting Started with NDepend - A Visual Studio AddIn (Part–1)

Rate me:
Please Sign up or sign in to vote.
4.76/5 (3 votes)
2 Sep 2010CPOL4 min read 26.7K   4   3
Getting Started with NDepend - A Visual Studio AddIn (Part–1)

Introduction

NDepend is a Visual Studio tool to manage .NET code and achieve high quality product. Using NDepend, you can improve your code quality. You can find the unreachable code very easily using this tool. Not only this, it visualizes your code using Graphs & Treemaps. Hence, you can improve the quality of your Software by measuring the Code Metrices.

image

I just got a chance to explore NDepend Professional tool and found it a little bit useful (as of now) for day to day coding life. I thought of sharing the same experience with you all. Though this is my first day exploring NDepend and hence I don’t have so much proficiency or knowledge, somewhat I felt it useful. Once I explore more, I will be able to tell more about it. In this post, I will describe it and how to install as an Add-In to your Visual Studio IDE. Read it and share your feedback.

What is NDepend?

As mentioned in the introductory part, NDepend is a Visual Studio Tool to manage .NET code to achieve a high quality product. I am not going to explain all the features, as it is new to me as well. But, among them which I really found very interesting is the CQL (Code Query Language). CQL supports maximum flexibility and using it, you can easily query your codes.

Using CQL query, you will be able to know:

  • whether your code is layered properly
  • which classes inherits from a particular interface
  • which classes are not covered thoroughly, etc. etc.

If your method exceeds more than x lines of code or does not follow the proper naming convention, you can show warnings at the time of build.

Using NDepend, you will be able to create Dependency Charts and the complexity report of your code. Also, you will be able to monitor the various build versions.

Learn more about the NDepend Features here.

Installing NDepend

If you are new to NDepend, download the Free Trial version from NDepend download site. Once downloaded, extract the downloaded .zip file to your local hard drive. You will see a list of files and folders in the extracted folder:

image

If you purchased your NDepend license, you will get the license file which you have to copy in this directory location. The NDepend application will automatically read the file and register it for full professional version. There are two different ways to install the NDepend tool. Let us go through each step.

Installing NDepend (Method 1)

Among the extracted files, you will see the “NDepend.Install.VisualStudioAddin” file. Double click it to run the application.

image

This will open the “NDepend’s Visual Studio AddIn Install” dialog which will look like below. This supports Visual Studio 2005, 2008 & 2010. Based upon your installed version, the respective option will be enabled for you. Click the Install button next to the Visual Studio version to install it.

image

This will take 2-3 seconds to install the addin to your IDE.

Installing NDepend (Method 2)

You can install the NDepend in another way. Go to the extracted directory, there you will find another application named “VisualNDepend”. Double click on it to run the application.

image

The Visual NDepend Window looks like this:

image

Here, you will see the option to install the addin for your Visual Studio. I was a little confused between the two approaches. This one has only one option. Later, my eye went to the icon. Woh! It has two different icons, which means you will be able to install for various versions too.

Click the “Install Visual Studio AddIn” to start the installation steps. This will actually open the options page to the screen. There in the “Visual Studio Add-In” tab item, you will see the same options you saw in the first method. Visual Studio 2005, 2008 & 2010 listed there. The respective installed version will be enabled. Click the “Install” button to start the installation.

image

Once you follow either of the above two methods, your NDepend will register itself with your IDE.

Verifying the Installation

Once you install the tool properly, open your respective Visual Studio IDE. There you will see the “NDepend” menu in the IDE Menubar. Click on that and you will see the menu as shown in the below screenshot.

image

This confirms proper installation of the NDepend tool & successful integration with the Visual Studio IDE.

This is little about NDepend and its installation process. In the next post, I will try to cover more about it. Till then, enjoy reading the other articles.

Image 10
Image 11

Image 12

This article was originally posted at http://www.kunal-chowdhury.com/feeds/posts/default

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
India India

Kunal Chowdhury is a former Microsoft "Windows Platform Development" MVP (Most Valuable Professional, 2010 - 2018), a Codeproject Mentor, Speaker in various Microsoft events, Author, passionate Blogger and a Senior Technical Lead by profession.

He is currently working in an MNC located in India. He has a very good skill over XAML, C#, Silverlight, Windows Phone, WPF and Windows app development. He posts his findings, articles, tutorials in his technical blog (www.kunal-chowdhury.com) and CodeProject.


Books authored:


Connect with Kunal on:





Comments and Discussions

 
GeneralMy vote of 1 Pin
pramendra_dadhwal6-Sep-10 20:45
pramendra_dadhwal6-Sep-10 20:45 
GeneralMy vote of 5 Pin
Abhijit Jana3-Sep-10 4:24
professionalAbhijit Jana3-Sep-10 4:24 
GeneralRe: My vote of 5 Pin
Kunal Chowdhury «IN»3-Sep-10 7:08
professionalKunal Chowdhury «IN»3-Sep-10 7:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.