3

Visual Studio 2015 has a Analyze->'Calculate Code Metrics' menu item which helpfully provides lines of code (LOC) and Cyclomatic complexity metrics for projects, classes and methods.

It also has a handy 'Open List in Microsoft Excel' button; handy if you have Excel anyway. Is there any way to export the data as a CSV file when Excel isn't installed?

redcalx
  • 8,177
  • 4
  • 56
  • 105
  • Not sure if there is a way from Visual Studio itself; however you could use the metrics power tool from the command line, which produces an XML report that you could transform to CSV, etc. [information here](http://blogs.msdn.com/b/camerons/archive/2011/01/28/code-metrics-from-the-command-line.aspx) and [download here](https://www.microsoft.com/en-us/download/details.aspx?id=48213) – Stephen Byrne Feb 21 '16 at 23:59
  • @StephenByrne First link returns 403 error... – Robbie Dee Sep 23 '22 at 09:22

0 Answers0