I have set up code analysis on all my solution's projects in VS 2015 and it runs fine. In one of the projects, there is .ruleset file and all other projects reference that file as a rule set for their code analysis. Now I want this same code analysis to be run on TeamCity which runs on Windows Server 2012 R2 without VS installed.
I have tried /p:RunCodeAnalysis=True
as command line parameter to MSBuild step as proposed here. But this option was apparently ignored since build log did not say anything about running code analysis. I did not setup FxCop build step because it required .dll files to be pointed to, but I wanted Code Analysis to actually analyse code in my solution, and not IL.
Is solution proposed here the only one possible? It looks a bit like an error-prone hack to me.