Using devenv.exe from the command line and specifying the platform
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe” myproject.sln /Build “Release|x86
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe” myproject.sln /Build “Release|x86
On a 32-bit machine: Any CPU: runs as a 32-bit process, can load Any CPU and x86 assemblies, will get BadImageFormatException if it tries to load an x64 assembly. x86: same as Any CPU. x64: BadImageFormatException always. On a 64-bit machine: Any CPU: runs as a 64-bit process, can load Any CPU and x64 assemblies, … Read more