tags:

views:

1469

answers:

5

Looking for a tool to calculate the # of lines of code in an asp.net (vb.net) application.

The tricky part is that it needs to figure out the inline code in aspx files also.

So it will be lines of code in vb files (minus comments) plus the inline code in aspx files (not all the lines of aspx files, just the code between <% %> tags.

+1  A: 

I've not tried it myself but LineCounterAddin is visual studio plugin that includes the step-by-step guide to it's creation. It supports the formats you're asking about (VB and ASPX) as well as heaps more (e.g. XML, XSD, TXT, JS, SQL...).

C4H5As
It doesn't work in VS 2008.
Abdu
On the contrary. It works fine in VS2008 you just need to edit the .addin file to say version 9.0 instead of 8.0.
Nathan Taylor
+6  A: 

SlickEdit has some feature for that. I am not sure if it counts inline code. Worth giving it a try. If it does not work, let me know so that I can update my post.

The SLOC Report The SLOC Report tool provides an easy way to count the lines of code. The line count is divided into three categories: code, comments, and whitespace. Once the lines of code have been counted, the results are drawn as a pie graph. SLOC reports may be generated for solutions, projects or individual files.

Gulzar
A: 

I've had great experience with CLOC. It has a wide variety of command line options. One counter-intutive thing with it, though, the first command line argument is the directory to begin counting in, usually you can just place cloc into the parent directory of your source and use "." (it goes through subdirectories of the specified directory).

MetroidFan2002
A: 

From a previous post, Source Monitor appears to be the answer and NDepend for .NET.

Brandon
A: 

Why did nobody post grep, ln

Paco