Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I figured this out shortly after posting it.</p> <p>Team Build supports the following values for RunCodeAnalysis: <em>Always</em>, <em>Default</em>, <em>Never</em>. </p> <p>In contrast, locally MSBuild supports <em>True</em> or <em>False</em> for RunCodeAnalysis.</p> <p>Why are they different? In looking at the Microsoft.TeamFoundation.Build.targets file, the following appears:</p> <pre><code>&lt;Target Name="CoreCompileSolution"&gt; &lt;PropertyGroup&gt; &lt;CodeAnalysisOption Condition=" '$(RunCodeAnalysis)'=='Always'"&gt;RunCodeAnalysis=true&lt;/CodeAnalysisOption&gt; &lt;CodeAnalysisOption Condition=" '$(RunCodeAnalysis)'=='Never'"&gt;RunCodeAnalysis=false&lt;/CodeAnalysisOption&gt; ... &lt;/PropertyGroup&gt; ... &lt;/Target&gt; </code></pre> <p>These settings are then passed onto the msbuild process when it compiles the solution file.</p> <p>So in other words:</p> <p><strong>Always</strong> tells MSBuild to compile all projects with <em>RunCodeAnalysis=True</em></p> <p><strong>Never</strong> tells MSBuild to suppress code analysis (<em>RunCodeAnalysis=False)</em> on all projects.</p> <p>...and <em>not specifying a value for RunCodeAnalysis</em> means that MSBuild will respect the RunCodeAnalysis setting in the project file. Hence, the <strong>default</strong> setting.</p> <p>Simply removing the /p:RunCodeAnalysis from my original question had the correct result. Projects that have analysis turned on will run code analysis. Projects without the setting don't perform any extra work.</p> <p>More information about this is available here: <a href="http://www.bryancook.net/2011/06/build-server-code-analysis-settings.html">http://www.bryancook.net/2011/06/build-server-code-analysis-settings.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload