Using devenv.exe from the command line and specifying the platform

user2687412 picture user2687412 · Sep 19, 2013 · Viewed 37.2k times · Source

I'm attempting to compile a visual studio solution using devenv.exe from the command line. I can get it to work but all the projects in the solution are compiled for AnyCPU and I want them to be compiled for x86. Both the debug and release configurations are set to x86 for all projects.

When I compile from within the IDE it works fine. But when I try to build the solution from the command line it always builds all projects for AnyCPU. Is there a way to devenv.exe to build in x86 only?

We are using Visual Studio 2012

Answer

user240141 picture user240141 · Sep 19, 2013

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" myproject.sln /Build "Release|x86"