One team will analyze our .NET solution code. Before that, we wondered how many lines of code contains our project.
Is there a way to achieve find out this (in VS 2010) ?
One team will analyze our .NET solution code. Before that, we wondered how many lines of code contains our project.
Is there a way to achieve find out this (in VS 2010) ?
Open the search (ctrl+shift+f),
Search for all files in the solution (*.cs or *.vb), use regular expression ^
(line beginning).
Wait.
PS.
you can filter out empty lines with ^.+$
(a @ssc-hrep3 suggestion)
You can also use DPack:
DPack is a FREE collection of Microsoft Visual Studio 2008/2010 tools. DPack is designed to greatly increase developer's productivity, automate repetitive processes and expand upon some of Microsoft Visual Studio features.
DPack is very handy but you can use it only for solution statistics:
Solution statistics feature allows one to evaluate the size of the entire solution. It collects information on all projects in the currently opened solution. The information is collected on code files only and includes: total number of lines, total number of code lines, total number of comment lines and total number of empty lines in each project. Solution statistics can be exported to a comma delimited CSV file using Export button.
Using powershell move to the folder containing your project files and enter the command
(dir -r -include *.cs,*.vb | select-string . ).count
replace "cs" "vb" with file extensions you want to include in your count.
Yes
Here is a tutorial: http://blogs.msdn.com/b/habibh/archive/2009/10/27/how-to-count-the-lines-of-code-loc-in-your-application-using-visual-studio.aspx
Or you can use a dedicated tools like this one: http://code.msdn.microsoft.com/LOCCounter