Project Line Counter

Cags

Well-known member
Joined
Feb 19, 2004
Messages
690
Location
Melton Mowbray, England
I used to use a Visual Studio 2003 addin called Project Line Counter. This seems to have alot of issues however as it keeps disappearing from the toolbar. I think it might not like the fact I often run several instances of VS at the same time. I was wondering if anybody could suggest a tool that can count code lines, comment lines, comment/code lines etc.
 
My recommendations are to either use a hard core metrics tool like NDepend or something a little more lightweight like NCover with the NCover Explorer. I have used both and they worked very well.

Ncover with NCover Explorer is nice because it integrates easily into your existing Unit Test regiment (with NUnit, of course ;)) and can also be easily folded into a continuous integration process with CC.Net through either build tasks in Nant/MSBuild or simple exec commands. Plus you can make nice html documents that are easy to read and use. Of course, counting lines of code is kind of a secondary function of this tool. Its real intent is code coverage.

NDepend gives you a lot of information and can be very overwhelming for anything bigger than a medium sized project. It will give you your LOC and a whole lot more.
 
As for disappearing toolbars, Ive only had success doing it this way:
1. Close all instances of VS except one.
2. Add your toolbar button or add-in.
3. Close VS (now nothing should be open)

Now whatever change you made will "stick" with all new open instances of VS.

-ner
 
I tried it that way and it worked for a fair while, but then all of a sudden the toolbar is gone again. Its not even that its just not visible, it doesnt appear on the toolbar list when you right click the toolbar. As for your suggestions mskeel, that would be overkill to say the least. I only use the line counter for two things really. Firstly most lines which contain comments and code in my applications need attention, its generally where ive commented out half a statement which needs either removing or replacing. Secondly I just like to know how big each class is, its not really relevant in anyway, I just like to keep informed.
 
Back
Top