woensdag 22 augustus 2012

Compiler warning: There was a mismatch between the processor architecture of the project being

I recently created a new SharePoint 2010 development machine. Since Visual Studio 2012 is out now I decided to use this version of Visual Studio. Everything works fine, but I receive a compiler warning:
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL", "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.

Since I do not want to change the deployment target platform, the most simple solution is to suppress the error message.

Unload the project en edit the project file.
Add the following to the  (first) propertygroup element

<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>

Geen opmerkingen: