Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running and reporting Visual Studio 2012 Code analysis in TeamCity

What is the best way to run and report Visual Studio 2012 code analysis in TeamCity?

like image 406
haymansfield Avatar asked Oct 24 '13 14:10

haymansfield


People also ask

What does run code analysis do?

The Code Analysis feature of Visual Studio performs static code analysis to help developers identify potential design, globalization, interoperability, performance, security, and a host of other categories of potential problems.


1 Answers

Since FxCop or Code Analysis integrates directly into MsBuild, it's probably as simple as adding /p:RunCodeAnalysis=Always or /p:RunCodeAnalysis=True to the MsBuild commandline when building the project. Since this will generate standard compiler warnings, TeamCity should pick them up automatically.

like image 97
jessehouwing Avatar answered Sep 28 '22 08:09

jessehouwing