Running and reporting Visual Studio 2012 Code analysis in TeamCity

巧了我就是萌 提交于 2019-12-04 22:56:11

问题


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


回答1:


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.




回答2:


Visual Studio 2010+ Code Analysis is (based on) FxCop 10.0. You can simply add a 'FxCop' build runner type build step.

When the 'Report XSLT file' setting is configured the build runner will output a HTML report. FxCop 10.0 includes a default XSLT file under '%system.FxCopRoot%/Xml/FxCopReport.xsl' to generate a default HTML report.



来源:https://stackoverflow.com/questions/19569097/running-and-reporting-visual-studio-2012-code-analysis-in-teamcity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!