views:

1349

answers:

3

I want to automate the process of gathering code metrics on a .NET solution. Is there any way of getting msbuild to run the Code Metrics feature included in VS2008 Development Edition?

I may end up using SourceMonitor, but I would like to know if there is a way to use the VS code metrics engine from the command line.

+2  A: 
shackett
+2  A: 

jgwood - I believe he's referring to Code Metrics (cyclomatic complexity, etc.) and not FxCop. I have been looking for a solution for this as well, as the FxCop rule for complexity has hardcoded threshholds. It sounds like there's no command-line or API for the metrics in VS2008 yet (per this post on the Code Analysis Team Blog) - hopefully they'll release a powertool.

Have you looked at NDepend for this?

ericmatz
+2  A: 

Any news on the subject?

I'm looking to run Code Metric as part of MSBuild on Build Server (even if developers have professional edition, my server have team suite). How do I change the build to run Code Analysis and see a link to the report?