I need to set up a build step in Teamcity for FxCop. I also need to generate the fxcop results in a xml file. Please help me. I am new to Teamcity. I would really appreciate if someone could post screenshots also. I did google, but could not able to understand properly.
To get FxCop running in TeamCity, would need to follow these steps:
Install FxCop on the Agent (or all of agents if you have more).
Download it here: https://fxcopinstaller.codeplex.com/
Edit file buildAgent.properties
and add information about FxCop instalation folder.
Add line: system.FxCopRoot=C:\Program Files (x86)\Microsoft Fxcop 10.0
Create the build step. It is easy now. The interesting settings are:
Runnert Type: FxCop
FxCop version: 10.0
Assembiles: for example bin*.dll
Report XSLT file: %system.FxCopRoot%/Xml/FxCopReport.xsl
Additional FxCopCmd options: for example /ruleSet:"=%teamcity.build.workingDir%\Core\ProjectRules.ruleset"
.
I use this to specify custom rules settings
The XML is then generated to a path which can then be found in the build log. To change the path you can use more FxCopCmd parameters, more info here: http://msdn.microsoft.com/en-us/library/bb429449%28v=vs.80%29.aspx
Let me know if you have any questions.