Count the number of lines of code in an ASP.Net Web Application

by Heathesh 3. April 2013 05:39

The requirement was simple, count the number of lines of code in an ASP.Net Web Application including the number of HTML lines. To fulfil this requirement I thought I would whip up a quick console app.

How it works is pretty straight forward:

  1. Get the list of files it needs to do the counts for
  2. Make sure the list of files only includes the relevant file types
  3. Make sure the list skips the ASP.Net generated file types
  4. Skip folders if and when required
  5. Make sure it only counted lines of code and not comments and regions
  6. Generate a CSV file called "output.csv" with the relevant details

All the settings should be self explanatory and found in the app.config file in the project. I've included the source for the app in a zip file and saved it here:

http://heathesh.com/ftp/LinesOfCodeCounter.zip

Happy Counting!

 

Tags: , , ,

Development | .Net



Powered by BlogEngine.NET 1.5.0.7 (with enhancements by Heathesh)
Theme by Mads Kristensen (with tweeks by Heathesh)

Certifications

Microsoft Certified Professional

Microsoft Certified Technology Specialist

Answer Questions

 

Tag cloud

Calendar

<<  September 2017  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

View posts in large calendar

http://heathesh.com