Search code examples
visual-studiotfssharepoint-2013code-analysisbuild-server

Ask TFS Build Server to not run Code Analysis on specific project


In our project we now have Code Analysis (CA) set per project and this is propagated to the TFS build server. But we would like not to run CA when we build locally, only on the build server.

The thing is, we have one project (SP 2013) which doesn't produce a DLL and this causes CA errors: - CA0052 No targets were selected - Could not load file .... App.dll

We could supress these, but I would like to have CA skip this project on the build server. Is this at all possible?


Solution

  • You could depending on how you do your configurations, only set code analysis to run on 'Release' Configuration. then set the one project so that the 'Release' configuration doesn't run CA. this way your devs can build under 'debug' with No CA and the TFS builds run under 'Release' with AsConfigured