Archive for the ‘Tools’ Category

NavigateToTest VS extension

Monday, May 3rd, 2010

You can download the extension here:
NavigateToTest Visual Studio extension

Some time ago I blogged about the GoToTest macro I use in my daily work.

Recently I decided to create a Visual Studio 2010 extension.

Extension is convention based. It matches ClassName file with ClassNameTest or ClassNameTests and vice-versa, so you can easily navigate to the test file and back.

Here are some screenshots:

You’ll need to add toolbar manually:

Here’s the toolbar:

And two opened files:

You can download the extension here:
NavigateToTest Visual Studio extension

Editor Guidelines in VS2010

Wednesday, April 28th, 2010

In VS2008 this could be done easily, it was just required to modify the registry.

Visual Studio 2010 lacks this feature, but there is a cool plugin for that:
Editor Guidelines.

Just download, install, and put the following code in to the registry:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio10.0Text Editor]
"Guides"="RGB(255,0,0) 80"

Source lines of code count using PowerShell

Monday, March 29th, 2010

Source lines of code (SLOC) is a software metric used to measure the size of a software program by counting the number of lines in the text of the program’s source code.

As we all know the disadvantages of this metric, sometimes we simply want to know.

Here’s a PowerShell script, that recursively searches for *.cs files and counts the lines (empty lines and comments are excluded)

(dir -include *.cs -recurse | select-string "^(s*)//" -notMatch | select-string "^(s*)$" -notMatch).Count

Brief description of what all parts are doing:

  • dir -include *.cs -recurse : Lists all *.cs files, you can add additional extensions using a comma.
  • select-string “^(s*)//” -notMatch : Exclude comments.
  • select-string “^(s*)$” -notMatch : Exclude empty lines.

Don’t just roll the dice

Monday, March 22nd, 2010

If you are an Independent Software Vendor (ISV) or plan to release your first piece of software, this is definitely a book for you.

A usefully short guide to software pricing. How do you price your software? Is it art, science or magic? This usefully short book will help you get the theory, practical advice and case studies you need to stop you reaching for the dice.

You can download the book for free here :
http://www.neildavidson.com/dontjustrollthedice.html

Very good read. I certainly recommend it.

Red line at 80th column in VS

Wednesday, October 14th, 2009

vs_redline_at80There is a hidden feature in Visual Studio. You can add a nice, red, vertical line to your editor.
All you need to do is to create a .reg file with the following content:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio9.0Text Editor]
“Guides”=”RGB(255,230,230), 80″

And add it to registry (double click). That’s it!