Bitness issue (32bit vs 64bit)

我们两清 提交于 2019-12-13 06:00:34

问题


I'm having issue running my application locally because of the bitness problem. However, if I deploy it to the server and set the application pool 64bit then it works fine. I need this to work local so I can debug the project. I'm hoping someone could help me.

These are the things I have checked so far:

  1. use corflag to make sure the dll is in 64bit
    1. make sure the prefer 32bit is not checked
    2. make sure the target platform is set to 64 bit in my main project and the dependent project
    3. I'm running on a 64bit machine
    4. check the registry for any flag that could trigger 32bit (if so turn it off)

So I make sure everything is consistent in 64bit mode. I'm not using 'any cpu'. I specified a specific target platform, in this case, 64bit.

I examine the output window and see the following: LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/... LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/...

I'm get this error when I try to compile the project: Could not load file or assembly 'AssemblyName' or one of its dependencies. An attempt was made to load a program with an incorrect format.

This leads me to believe I still have the bitness issue somewhere. I have done hours of research online and current run out of ideas...

来源:https://stackoverflow.com/questions/20982032/bitness-issue-32bit-vs-64bit

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