0

I have used Analyze toolbar-> Calculate metrics in Visual Studio to count lines in whole of the solution. It only counts C# code, it doesn't take .xaml,.xaml.cs and .sql files into consideration. Is there any tool or Add-in that would help me in counting lines from all of these files?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Srinivas
  • 45
  • 1
  • 5
  • http://stackoverflow.com/questions/1244729/how-do-you-count-the-lines-of-code-in-a-visual-studio-solution. Check out answer by @Greg D – Nitin Jan 06 '15 at 11:08

1 Answers1

0

You can use CLOC (Count Lines of Code) program to count lines. It's command line program but it's very simple to using.

Usage: cloc [options] <file(s)/dir(s)>

CLOC options you can find here.

If you want to count lines in the entire solution you should invoke cloc with following parameters:

cloc "path_to_solution_directory"
mcalex
  • 6,628
  • 5
  • 50
  • 80
kmatyaszek
  • 19,016
  • 9
  • 60
  • 65