Ben
Ben

Reputation: 2523

Mismatch between processor architecture of the project and the processor architecture of the reference

I have had this Warning lingering around the background of my project for quite a while now and I was told not to worry about it. However now I have other issues I figure now is probably the best time to enquire about it. (The best time was probably when I first occurred, but hey, too late for that now.)

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\Benjamin\Documents\Visual Studio 2010\Projects\DCIM\DCIM\bin\Debug\DCIM.exe", "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.

This same error shows twice in my errors list.

In all honesty, I have never before seen, heard of, or used the title 'MSIL' before in my life, but here it is now, and I have no idea what it wants or means.

This is what my Configuration Manager has to offer me: (again, no idea what this all means)

enter image description here

and the only other 'Active Solution Platforms' are "Any CPU" or "Mixed Platforms".

Can anyone explain why this warning is occurring, what it means and what I might be able to do to fix it?

Upvotes: 0

Views: 4160

Answers (1)

Johnny Fever
Johnny Fever

Reputation: 11

Late to the party, but here goes:

It basically means that between your projects in the solution and any third-party DLLs you are referencing, that you are mixing 32-bit (x86) and 64-bit (x64) architectures. 64-bit assemblies can typically interact with 32-bit ones, but not the other way around.

If any of your projects have references to any third-party apps, start there by determining what architecture they are (use 'dumpbin' if needed). Then make sure that all of the projects in your solution use the same in their respective project properties (Build tab -> General section -> Platform target).

Upvotes: 1

Related Questions