Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

warning MSB3270: mismatch between the processor architecture of the project

Tags:

c++

c#

c++-cli

I am building a project which is showing a warning:

warning MSB3270: There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference "DiagLib, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86", "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.

My project is working fine but I would like to remove this warning.

like image 305
yemans Avatar asked Mar 11 '14 10:03

yemans


1 Answers

See comment above.

The warning occurs for C# parts of your x64 program. It is probably set to "Any CPU" because your application is running fine.

For compound C#/C++ projects, better avoid "Any CPU" in the C# part. Make sure you set "x64" explicitly as Platform Target on all C# components and also "x64" for the current mode of your solution.

like image 175
Goodies Avatar answered Nov 09 '22 14:11

Goodies