0

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?

6
  • On x64 processor DCM Test will run as x64, ans DCM test remains x86, this will not work. Change DCM to Any CPU. If you cannot do this, change DCM Test to x86. Commented May 5, 2014 at 4:32
  • If Platform combo doesn't contain required platform, click "New" item and create new platform. Also, don't forget to check "Build" checkbox for all projects in the solution. Commented May 5, 2014 at 4:34
  • @AlexFarber if I do check build in both boxes (DCIM TEST is a Unit Testing Project) then all sorts of weird and wonderful errors start popping up in DCIM Test. Commented May 5, 2014 at 4:44
  • Also does the 'project name "MSIL"' mean anything? My project (and solution) name is DCIM? Commented May 5, 2014 at 4:47
  • Well, if you don't check it, it just not built - this is not solution you need. If all projects in the solution are .NET, just make them all "Any CPU". This is default .NET configuration. You need x86 only if some part of solution is native x86. Start from changing Active solution platform to "Any CPU". Commented May 5, 2014 at 4:48

1 Answer 1

1

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.