Microsoft Code Metrics Commandline

Because Microsoft does not like to provide this on their webpage, here are the command line instructions:

Microsoft (R) Code Metrics Command-Line Tool, Version 10.0
 Copyright (C) Microsoft Corporation. All rights reserved.

Help for command-line options:

/file: [Short form: /f:]
 Assembly file(s) to analyze.

/out: [Short form: /o:]
 Metrics results XML output file.

/directory: [Short form: /d:]
 Location to search for assembly dependencies.

/searchgac [Short form: /gac]
 Search the Global Assembly Cache for missing references.

/platform: [Short form: /plat:]
 Location of framework assemblies, such as mscorlib.dll.

/reference: [Short form: /ref:]
 Reference assemblies required for analysis.

/ignoreinvalidtargets [Short form: /iit]
 Silently ignore invalid target files.

/ignoregeneratedcode [Short form: /igc]
 Do not calculate metrics for generated code.

/successfile [Short form: /sf]
 Create .lastcodemetricsssucceeded file in output report directory if no errors occur during calculation.

/quiet [Short form: /q]
 Silence all console output other than error reporting.

/help [Short form: /?]
 Display this help message.

Leave a Reply