chans
chans

Reputation: 497

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "AMD64

I have a Visual Studio 2012 .Net main project with a platform target x86 specified in its build properties. The project consist of multiple C++ project and C# project. In my Configuration Manager, platform for C# project is Any CPU and for C++ project is Win32. I want to reference a 3rd party dll which is targeted for AMD64. When I add the reference, I get following warning:

Warning: Warning: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "DALSA, 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.

If I try to change main C# project build for platform target x64, it complains because external DLLs it depends on has platform target x86.

Any What am I doing wr0ng?

Upvotes: 0

Views: 4667

Answers (1)

Dialecticus
Dialecticus

Reputation: 16761

So you have two left shoes, and not a single right shoe. If you want to walk you should somehow get a right shoe. Either get x86 DALSA, or Win64 external DLLs.

It is impossible for a single process to run on different architectures.

The only other alternative is to make a helper process that main process would connect to with some IPC like pipe, and that would run on complementary architecture. Or wrap DLLs with COM object.

Upvotes: 2

Related Questions