I am upgrading our TFS 2012 system to TFS 2015, and have an issue with one of our upgraded XAML builds. The build compiles >200 projects without an issue, however two project produce the following SGEN error. It appears the build engine attempts to build the project using the x86 4.0 version of the mscorlib, but I think it needs the x64 version. The build server has both x86 and x64 versions of the .Net 4. 0 framework installed.
From the build Log:
- Built $ Change-Management/.../Helpers.csproj for default targets.
- WARN: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference
- Warn: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll", "x86". 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.
- WARN: CSC:Assembly generation -- Referenced assembly 'mscorlib.dll' targets a different processor
- ERROR: SGEN: An attempt was made to load an assembly with an incorrect format: C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
I have tried the SO solution described here but it did not work. I attempted to install the Widows 8 SDK (the server is 2008 r2).
Ideas?