Here is a free code metrics tool

http://blogs.msdn.com/b/camerons/archive/2011/01/28/code-metrics-from-the-command-line.aspx

You can use this from the command line by creating a folder, putting the below dlls there and setting this up as a post build event. Useful if you want to get it running without having others install the exe.


FxCopCommon.dll
FxCopSdk.dll
Metrics.exe
MetricsReport.xsd
Microsoft.Cci.dll
Microsoft.VisualStudio.CodeAnalysis.Common.dll
Microsoft.VisualStudio.CodeAnalysis.DataflowModels.dll
Microsoft.VisualStudio.CodeAnalysis.dll
Microsoft.VisualStudio.CodeAnalysis.Interop.dll
Microsoft.VisualStudio.CodeAnalysis.Phoenix.dll

The post build command line is:

$(SolutionDir)folderName\metrics.exe /f:"$(TargetPath)" /o:"$(SolutionDir)folderName\Reports\$(TargetName).Metrics.xml"

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

Enable Visual Studio to use more than 2GB of memory