问题
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:
- use corflag to make sure the dll is in 64bit
- make sure the prefer 32bit is not checked
- make sure the target platform is set to 64 bit in my main project and the dependent project
- I'm running on a 64bit machine
- 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