Alex Rivera | Logout

Lines-of-code counting for many C# solutions

Asked 2010-05-05T12:16:12.180
14

I am currently researching a solution for counting lines of code in C#.

I pretty much need a combination of the following two tools:
http://richnewman.wordpress.com/2007/07/01/c-and-vbnet-line-count-utility/
http://www.locmetrics.com/index.html

My problem is that I need to recursively scan a folder containing a lot of visual studio solutions. So can't really use the first tool without any major work on its code, as it's only able to scan a single solution at a time.
But I also need to split the results for each solution, preferably even the contained projects. This disqualifies the second tool I found. I also found NDepend which suffers from the same problem.

Do you know of any free tools that do what I need? I am unable to find anything suitable.

Edit
Report

1 Answer

2

What you need is logical lines of code counting as defined here: How do you count your number of Lines Of Code (LOC)

If you use NDepend to count your number of lines of code you can still append all your VS sln in a NDepend project. However logical lines of code is a metric inferred from PDB files so make sure that all your assemblies have corresponding PDB files associated.

Also you might be interested by:Why is it useful to count the number of Lines Of Code (LOC) ?

answered 2010-05-06T08:17:07.490

Your Answer