When I am trying to run the Debugger for Visual Studio 2010 and for Visual Studio 2012, I get the below error:
Error while trying to run project: Could not load file or assembly 'MyProject' or one of its dependencies. An attempt was made to load a program with an incorrect format.
But when I go to the x64/Debug folder and run the EXE directly, it opens fine.
I've tried disabling the project that contains the 32-bit references, but it still gives me the error even when all the other projects are 64-bit (set through Configuration Manager)
Edit #1: In 32-bit compilation mode, I set everything to Any CPU
except the Main startup project to x86 and it runs Debug Mode fine. When I go to 64-bit, and do the same but change Main startup project to x64 it gives the above error. I tried setting all Target values to x64, but still nothing.