Categories
Programming

How to install NDepend in to Microsoft Visual Studio

So I had a very kind E-mail from a chap called Patrick Smacchia the other day offering me a free professional license for his software NDepend. There were no strings attached, he simply offered “I would be glad to offer you a pro license. This way you can use the tool and explain its capabilities on your blog if you find it useful”. I was a tad sceptical at first so did a little research and found out what it is; the description was a little cryptic – essentially it’s a suite of tools with its own language that allows you to analyse your code to find out more information e.g. number of lines of code in certain sections, code or framework dependencies, what are the most complex or largest functions etc. This essentially can help you understand the complexity and quality of your code which can help you improve it.

The product looks extremely powerful – not only can you use a set of 600 200 odd rules you can also write your own using its own version of Linq. Now I’m sure many people who read my blog regularly (I have no idea how many regulars I have but I’m guessing it’s actually quite a small number) but those that do will see that I often cover rare but convoluted issues (or sometimes simple ones that have just not been documented); you may not know, however, that I code mostly on my own. It’s for this reason that I thought NDepend probably won’t help me too much as I figure it’s more team oriented, and so I communicated this to Patrick but as I said – the offer was completely no strings attached and so I figured why not give it a go.

Hence I’m now writing this article. I don’t know if there will be any more to come as I have no idea if I’ll like the product or find it useful but I guess we’ll just have to wait and see. My first experience so far is, obviously, installation. This should be relatively straight forward (copy it to a folder not in Program Files and run the installer) but for a pedant like me it threw up a few issues – notably it couldn’t install from Program Files because some DLL’s were blocked, so here’s the solution:

  1. First download the install from: http://www.ndepend.com/NDependDownload.aspx
  2. Unzip the zip file and copy to C:\Program Files\NDepend (or C:\Program Files (x86)\NDepend if you’re running 64-bit Windows like me)
  3. Download streams.exe from http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx and copy it to C:\Program Files
  4. Run a Command Line as administrator (Start -> type cmd then right click and select Run As Administrator)
  5. Type C:\Program Files (or C:\Program Files (x86) if running 64-bit Windows) and hit enter
  6. Type “streams –s –d NDepend” and hit enter
  7. Now in Windows Explorer navigate to C:\Program Files\NDepend (or C:\Program Files (x86)\NDepend) and double-click NDepend.Install.VisualStudioAddin.exe
  8. Alongside the appropriate version of Visual Studio click Install
  9. You can now delete streams.exe from your Program Files folder if you wish!

Now when you load Visual Studio you should see a new menu has appeared called NDepend. I’ll give this a trial over the new few weeks and if I find anything worth writing about then I’ll add it to the blog!

About Stephen Pickett


Stephen Pickett is a programmer, IT strategist and architect, project manager and business analyst, Oracle Service Cloud and telephony expert, information security specialist, all-round geek. He is currently Technical Director at Connect Assist, a social business that helps charities and public services improve quality, efficiency and customer engagement through the provision of helpline services and CRM systems.

Stephen is based in south Wales and attended Cardiff University to study Computer Science, in which he achieved a 2:1 grading. He has previously worked for Think Consulting Solutions, a leading voice on not-for-profit fundraising, Fujitsu Services and Sony Manufacturing UK as a software developer.

Stephen is the developer of ThinkTwit, a WordPress plugin that allows you to display multiple Twitter feeds within a blog.

By Stephen Pickett

Stephen Pickett is a programmer, IT strategist and architect, project manager and business analyst, Oracle Service Cloud and telephony expert, information security specialist, all-round geek. He is currently Technical Director at Connect Assist, a social business that helps charities and public services improve quality, efficiency and customer engagement through the provision of helpline services and CRM systems.

Stephen is based in south Wales and attended Cardiff University to study Computer Science, in which he achieved a 2:1 grading. He has previously worked for Think Consulting Solutions, a leading voice on not-for-profit fundraising, Fujitsu Services and Sony Manufacturing UK as a software developer.

Stephen is the developer of ThinkTwit, a Wordpress plugin that allows you to display multiple Twitter feeds within a blog.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.