Error building processor architecture mismatch

When trying to run a test application twice, we get the following error:

A mismatch was found between the processor architecture of the project "MSIL" being created and the processor architecture of the link "C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ mscorlib.dll", "x86".

This mismatch can lead to runtime failures. Please consider changing the target processor architecture of your project through Configuration Manager to align processor architectures between your project and the links, or depend on links to the processor architecture that matches the target processor architecture of your project. TestMobile.Core MSIL x86 mismatch

I have the .NET Framework installed, as well as SDK tools for Windows 8 and using MultilingualAppToolKit.

I already checked the configuration manager and everything seems fine. Any CPU targeting platform

+7
android c # build visual-studio-2015 xamarin
source share
4 answers

I ended up being able to build my project without this dirty mistake. It looks like I needed to install PortableLibraryTools from VS2010. After that he worked.

Link: http://forums.xamarin.com/discussion/25538/xamarin-xaml-example-problem-using-pcl

+1
source share

Copying over my existing version of the .NET Portable Library Assemblies link collections fixed this problem for me.

I ran into this problem after installing the patch in Visual Studio 2015 Update 3, read the vvolkgang answer and first abandoned it because I already had folders in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable , and the dates of these folders were later than the dates contained in the link assemblies of the archive that I downloaded. What I had to do was check the correct part of the folder hierarchy. Take a look at your project file; in my case, I had the following settings:

 <TargetFrameworkProfile>Profile49</TargetFrameworkProfile> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 

If these are your settings, you need to check the contents of C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile49 . If you’re using a different profile or targeting a different version of the framework, adjust the path accordingly. When I checked this folder, I found that I have many XML files, but no DLL; copying files from Microsoft.NET Portable Library Assemblies 4.6 collections and choosing not to replace any files that already exist fixed my build problems.

+8
source share

If this problem occurred after installing Visual Studio 2015 Update 2. Try this, the first one solved my problem:

Installing portable v4.6 class classes

  • Download Install Portable Class Libraries v4.6 . If you install this, it places the .zip file in the directory: "C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6"
  • Unzip and copy the contents to "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\"

Install PCL Tools

Source: Matt Ward @ https://forums.xamarin.com/discussion/comment/80535/#Comment_80535

+7
source share

If you are on the build server and get this error / warning, just install MSBuild 17 with its additional installation, which contains all the SDKs and portable libraries.

0
source share

All Articles