Calculator failed to build with "error MSB3271: There was a mismatch between the processor architecture of the project being built "" and the processor architecture, "AMD64"" with MSVC on Windows arm64ec
Calculator failed to build with "error MSB3271: There was a mismatch between the processor architecture of the project being built "" and the processor architecture, "AMD64"" with MSVC on Windows arm64ec. It can reproduce on latest version https://github.com/microsoft/calculator/commit/91adfd8e9e14b9719e51f4c5e2e06380b6f429cc on master branch. Could you please help look at this issue?
Repro steps:
- set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=arm64
- git clone https://github.com/microsoft/calculator F:\calculator
- cd F:\calculator
- set PATH=F:\Agent_work\1\s\src\tools\nuget;%PATH%
- cd src
- Change "ARM64" to "ARM64EC" in Calculator.csproj TraceLogging.vcxproj CalcManager.vcxproj GraphingImpl.vcxproj Calculator.sln GraphControl.vcxproj CalcViewModel.vcxproj file
- nuget.exe restore -ConfigFile F:\calculator\src\nuget.config Calculator.sln
- msbuild /m /p:Platform=ARM64EC /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.22618.0 /p:PlatformToolset=v142 Calculator.sln /t:Rebuild
Error info:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): error MSB3271: There was a mismatch between the processor architecture of the project being built "" and the processor architecture, "AMD64", of the implementation file "F:\calculator\src\ARM64EC\Release\TraceLogging\TraceLogging.dll" for "F:\calculator\src\ARM64EC\Release\TraceLogging\TraceLogging.winmd". 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 implementation file, or choose a winmd file with an implementation file that has a processor architecture which matches the targeted processor architecture of your project. [F:\calculator\src\GraphControl\GraphControl.vcxproj]
Error Log: Calculator_build_arm64ec.log