TFS have issued the following warning:
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.
Both "Release" and "Debug" configurations are set to use "Any CPU" as an active solution platform.
I took a copy of System.Data.dll into the TEMP folder and extracted information about this assembly through PowerShell:
function ScanAssembly($assemblyPath) {
[reflection.assemblyname]::GetAssemblyName($assemblyPath)
}
$assemblyPath = "C:\TEMP\System.Data.dll"
$assemblyInfo = ScanAssembly($assemblyPath);
$assemblyInfo | fl;
I got the following output:
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=...
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.
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.
Thank you.