DCSIMG
Code Metrics From The Command Line - Power Tools - Shai Raiten

Shai Raiten

 Subscribe

Code Metrics From The Command Line - Power Tools

Code Metrics From The Command Line - Power Tools

In my last post I’ve talked about What is Code Metrics in Visual Studio, and how Code Metrics will allow you to monitor you code to find those un-maintainable and complex hotspots

“Microsoft just release a command line because many customers are looking for a way to generate code metrics information as part of their build process. In this way, the complexity associated with assemblies coming out of your nightly builds could potentially be tracked and examined over time, which is where I think information like this is most valuable.”

From Article from Cameron Skinner

Download Code Metrics Command Power Tool

Usage

After the installation you can find metrics.exe in - C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop

  1. metrics.exe /f:FileName /out:ResultFile.xml
  2. metrics.exe /f:*.dll /f:*.exe /out:ResultFile.xml

Example: Metrics.exe /f:metrics.exe /out:D:\MetricsResults\r.xml

The result file looks like that:

image

In the next post I’ll show how to use Metrics.exe in your build process.

Enjoy.

Comments

Twitter Trackbacks for Code Metrics From The Command Line - Power Tools - Shai Raiten [microsoft.co.il] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Code Metrics From The Command Line - Power Tools - Shai Raiten         [microsoft.co.il]        on Topsy.com

# February 6, 2011 6:30 PM

Code Metrics Command-Line Power Tool Roundup | Learn TFS said:

Pingback from  Code Metrics Command-Line Power Tool Roundup | Learn TFS

# February 7, 2011 10:14 PM

February 8, 2011 – VS/TFS Links and Quick Hits | Learn TFS said:

Pingback from  February 8, 2011 – VS/TFS Links and Quick Hits | Learn TFS

# February 8, 2011 3:07 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: