title: Code Analysis Errors Only on Build Server
body: <p>I'm trying to figure out why code analysis would run and detect errors on our build server, but I don't see the same errors when building locally. Here is one example of code that's failing (because of our STBi acronym):</p>
  
  <pre><code>string message = string.Format(CultureInfo.CurrentCulture,
      "Unit STBi [{0}] blah... ",
      unitStbiParameter.Stbi);
  </code></pre>
  
  <p>The build fails on our TFS build server with errors like this:</p>
  
  <blockquote>
    <p>CA2204 : Microsoft.Naming :
    Correct the spelling of the unrecognized token 'STBi' in the literal
    '"Unit STBi ["'.</p>
  </blockquote>
  
  <p>The problem is that I don't know why I'm not seeing these CA errors when I build the solution on my laptop. This is in the project's properties:</p>
  
  <p><img src="https://i.stack.imgur.com/SZXBx.png" alt="enter image description here"></p>
  
  <p>And the build definition has this:</p>
  
  <p><img src="https://i.stack.imgur.com/ZvTMr.png" alt="enter image description here"></p>
  
  <p>Why would errors show from a build on the build machine but not my laptop? It's almost like the build server is using a different CA rule set. Is that possible?</p>
  
  <p>Side note: I tried adding STBi to the CustomDictionary.xml (below), but that still didn't help. But that's a separate issue.</p>
  
  <pre><code>&lt;!-- This is here because it's a workaround for a bug: http://connect.microsoft.com/VisualStudio/feedback/details/521030/ --&gt;
  &lt;DiscreteExceptions&gt;
    &lt;Term&gt;STBi&lt;/Term&gt;
  &lt;/DiscreteExceptions&gt;
  </code></pre>