title: System.Data processor architecture set to AMD64
body: <p>TFS have issued the following warning:</p>
  
  <blockquote>
    <p>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets
    (1605): There was a mismatch between the processor architecture of the
    project being built "MSIL" and the processor architecture of the
    reference
    "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.dll",
    "AMD64". This mismatch may cause runtime failures. Please consider
    changing the targeted processor architecture of your project through
    the Configuration Manager so as to align the processor architectures
    between your project and references, or take a dependency on
    references with a processor architecture that matches the targeted
    processor architecture of your project.</p>
  </blockquote>
  
  <p>Both "Release" and "Debug" configurations are set to use "Any CPU" as an active solution platform. </p>
  
  <p>I took a copy of System.Data.dll into the TEMP folder and extracted information about this assembly through PowerShell:</p>
  
  <pre><code>function ScanAssembly($assemblyPath) {
      [reflection.assemblyname]::GetAssemblyName($assemblyPath) 
  }
  
  $assemblyPath = "C:\TEMP\System.Data.dll"
  
  $assemblyInfo = ScanAssembly($assemblyPath);
  $assemblyInfo | fl;
  </code></pre>
  
  <p>I got the following output:</p>
  
  <pre><code>Name                  : System.Data
  Version               : 4.0.0.0
  CultureInfo           : 
  CultureName           : 
  CodeBase              : file:///C:/TEMP/System.Data.dll
  EscapedCodeBase       : file:///C:/TEMP/System.Data.dll
  ProcessorArchitecture : Amd64
  ContentType           : Default
  Flags                 : PublicKey
  HashAlgorithm         : SHA1
  VersionCompatibility  : SameMachine
  KeyPair               : 
  FullName              : System.Data, Version=4.0.0.0, Culture=neutral, 
                          PublicKeyToken=...
  </code></pre>
  
  <p>For some reason, the ProcessorArchitecture for this assembly is set to Amd64. I'm confused as to why it's set to Amd64, because I'm running a 64-bit operating system on an Intel processor.</p>
  
  <p>These warnings are not show stoppers, but I'm struggling to understand as to why we are seeing them. If I understand this correctly, the configuration is set to any CPU, when one of the assemblies is compiled for Amd64, which implies that it will no longer work on any CPU - it'll work only on 64 bit CPU. Why the System.Data.dll is built for Amd64 is beyond me.</p>
  
  <p>Thank you.</p>