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

a 夏天 提交于 2019-12-25 06:37:41

问题


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)

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?


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



来源:https://stackoverflow.com/questions/23464802/mismatch-between-processor-architecture-of-the-project-and-the-processor-archite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!