views:

644

answers:

2

There must be simple way, I do not want to run Code Analysis separately on each project.

+5  A: 

Sorry for the dumb response before..Here's what you REALLY do :)

Set each project to run code analysis on build:

  • right-click the project,
  • go to the Code Analysis tab
  • click "Enable Code Analysis on Build"

When you build the solution, it will run CA on each project

jlembke
Where's this Code Analysis tab you're talking about? Is it specific to VSTS? I am using Professional Edition and can't find it... I use a post-build event to run FxCop.
Martinho Fernandes
@Martinho - I'm using Professional also. Right click the project, and choose properties. It should open a view with a series of tabs. That's what I'm referring to.
jlembke
A: 

I wrote a custom MsBuild task that does this.

http://ripper234.com/p/msbuild-fxcopsolution-task/

ripper234