What are all (free or not) solutions for counting lines of code in a .NET solution?
Use two Visual Studios: 2012 and 2013.
What are all (free or not) solutions for counting lines of code in a .NET solution?
Use two Visual Studios: 2012 and 2013.
Right-click the solution, and then click Calculate Code Metrics .
Thiswindowwillappear:
with the following regex: ^(?([^\r\n])\s)*[^\s+?/]+[^\n]*$
do not forget to check the regex box
Just go to the Analyze menu - > Calculate Code Metrics
An alternative would be to use PowerShell, where you can count all non-blank lines of a solution . To do this, simply specify the directory and the extension of the files in which the count will be performed (.cs, .xaml, etc):
PS> Set-Location CaminhoDaSolution
PS CaminhoDaSolution> (dir -include *.extensao1, *.extensao2, *.extensao3 -recurse | select-string .).Count