If you want to integrate StyleCop with Jetbrains Teamcity, unfortunately, there is no built-in Runner for StyleCop in Jetbrains TeamCity, but you can use a combination of these tools in order to execute your StyleCop tasks and generate a report that can be displayed through the TeamCity Web User Interface:
- Download MSBuild Extension Pack from here: https://github.com/mikefourie/MSBuildExtensionPack/releases
- Once you have downloaded and installed MSBuild Extension Pack, if you have not already done so, download and install StyleCop: https://stylecop.codeplex.com/
- You will then need to copy the MSBuild.ExtensionPack.StyleCop.dll into the StyleCop directory
- Download the StyleCop.xsl file from this location: https://github.com/kopelli/VICI/blob/master/tools/StyleCop/v184.108.40.206/StyleCop.xsl
- Within an MSBuild Target, use the MSBuild Extension Pack StyleCop Task to generate your StyleCop report.
- Then use the XslTransformation Task in MSBuild to transform the StyleCop XML Report file against the XSL file you downloaded, to produce an HTML Report.
- Use these instructions to create a Report Tab in TeamCity for your StyleCop Report: https://confluence.jetbrains.com/display/TCD8/Including+Third-Party+Reports+in+the+Build+Results
- Use the TeamCity MSBuild Service Tasks to publish information about your StyleCop results such as your StyleCop Artifacts, your Report Statistics or if you want to fail the build: https://confluence.jetbrains.com/display/TCD9/MSBuild+Service+Tasks