3

When building my project in SharePoint 2010 I get the error: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Microsoft.Office.Server.Search


It does not seem to be any problems but it would be nice to know why i get these errors. I think I am using the right Microsoft.Office.Server.Search and all our projects have the same erros without anyone knowing why the error occurs. We are all using 64 servers and are using platform target: Any CPU. (for our 50 projects that is contained in this solution)

*

The file refered is: Microsoft.Office.Server.Search.dll //Microsoft.SharePoint.Search.dll // Microsoft.SharePoint.Search, Version=14.0.0.0, Culture=neutral, >PublicKeyToken=71e9bce111e9429c // Architecture: AnyCPU (64-bit preferred) // Runtime: .NET 2.0

Full error message: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1578): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=AMD64", "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.

  • Yeah. I'm getting it too. I searched the GAC and the Hive and only found the 13,285,480 byte AMD64 one, or in the GAC there is also a 10,648 byte MSIL one, but I think that is just a native DLL. Thanks for letting us know it still seems to work. I was loathe to try until I knew what the issue was. Swithcing the project build to x64 (which I thought was different to AMD64) gets rid of this warning but brings in two more (System.Web and System.Data target different processor). – Swanny Jun 19 '13 at 21:43
2

According to this blog post the only solutions are to:

  • set the project's PlatformTarget properly
  • ignore the warning
  • set ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch property to None in your project file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.