A tool to calculate # lines of code in code behind and aspx files?

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

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

Thus, these will be lines of code in vb files (minus comments), as well as inline code in aspx files (not all aspx file lines, just code between <%%> tags.

+6
source share
4 answers

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

+2
source share

SlickEdit has some features for this. I'm not sure if it has inline code. Worth a try. If this does not work, let me know so that I can update my post.

SLOC Report The SLOC Report Tool provides an easy way to count lines of code. The number of lines is divided into three categories: code, comments, and spaces. After the lines of code have been calculated, the results are displayed in a pie chart. SLOC reports can be generated for solutions, projects, or individual files.

+7
source share

I have not tried this myself, but LineCounterAddin is a visual studio plugin that includes a step-by-step guide on how to create it. It supports the formats you ask for (VB and ASPX), as well as more heaps (e.g. XML, XSD, TXT, JS , SQL ...).

+2
source share

I had a lot of experience with CLOC . It has many command line options. One counter-intuitive thing with it, however, the first command line argument is the directory in which you want to start counting, usually you can just put cloc in the parent directory of your source and use ".". (it goes through subdirectories of the specified directory).

+2
source share

All Articles