Running the integrated Code Analysis of Visual Studio 2010

Hello,

In my solution Code Analysis (FxCop?) is enabled for the Release configuration with the compilation constant CODE_ANALYSIS. It's running fine in Visual Studio

In my Build Condifuration of Team City I add those system build parameters:

system.RunCodeAnalysis true
system.DefineConstants CODE_ANALYSIS;SILVERLIGHT;WINDOWS_PHONE

The constants seems to be used since in the Build log the call to csc.exe contains the correct constants: /define:CODE_ANALYSIS;SILVERLIGHT;WINDOWS_PHONE

But the code analysis is not working, no error message and no message indicating that any analysis has been done.

I use the MSBUILD runner.

Any ideas?

Matthieu

2 comments
Comment actions Permalink

Matthieu,
In order to call FxCop code analysis (integrated to VS) from MSBuild via CODE_ANALYSIS constant you should install Visual Studio on the machine running TeamCity build agent.
Also you should perform additional setup to publish analysis result to the server. You could use TeamCity service messages for that.
As a workaround you could try to use FxCop runner bundled in TeamCity.

0
Comment actions Permalink

Yes, I wanted to avoid installing Visual Studio on the build server but I'm running out of time and patience.

Thank for the help !

Matthieu

0

Please sign in to leave a comment.