I'm unable to find a good option for my Visual Studio 2017.
I tried right clicking the projects, but there wasn't an option for "Analyze".
Just a few hours ago, I installed "Roslyn Code Analysis" using Nuget package manager. It's installed as "Archimetrics.Analysis".
How do I get "Lines of code" using this package. I have tried all the tried all the common ways of right clicking and trying to fins something but to no avail. That's why I installed this package "Roslyn" for code analysis, which is installed as "Archimetrics.Analysis".
A little hacky way that works quite well is to use a RegEx with Find in Files
^(?([^\r\n])\s)*[^\s+?/]+[^\n]*$
in the 'Find what:' fieldMatching lines: 25843
. That's the line countI use the famous "Supercharger" extension and among the many functions,it has just that:
Result:
Code structure statistics for project 'SysMonitor_1'
C# classes : 14
C# interfaces : 1
C# structs : 1
C# enums : 0
C# functions : 49
C# properties : 11
Code line count statistics for project 'SysMonitor_1'
C# comment lines : 128
C# empty lines : 105
C# pure code lines: 722
-----------------------------
Total C# lines : 955
Non-C# lines : 607
=============================
All lines : 1.562
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With