Wednesday, April 6, 2011

How can I run FxCop on an entire solution in Visual Studio 2008

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

From stackoverflow
  • 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

    Martinho Fernandes : 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.
    jlembke : @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.
  • I wrote a custom MsBuild task that does this.

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

0 comments:

Post a Comment