title: How to force MSBuild to run Code Analysis without recompiling
body: <p>By default, code analysis is only done for projects which are compiled. So when I run MSBuild from the command line, it runs code analysis only for the first time. On subsequent calls, code analysis is skipped.</p>
  
  <p>Background: I want to evaluate CA rules and see how many warnings there would be in our code when turning on a rule. For that I don't want to recompile everything - which takes some time - but just re-run the code analysis. How can you achieve this?</p>
  
  <p>I am using Visual Studio 2013 and MSBuild 12.0.</p>
  
  <p>Even explicitely switching on code analysis does not help:</p>
  
  <pre><code>msbuild DesktopBuild.proj /p:RunCodeAnalysis=true
  </code></pre>