I’m maintaining a build script that calls devenv or Incredibuild from the command line to build a dynamically generated Visual C++ 2010 solution made up of several hundred projects. We’re looking into ways of improving our build and I was wondering if there was a way to tell VS to avoid using intermediate directories.
For example, say I have a project Foo in a solution Bar. When I build Bar, the output from Foo ends up both in Bar/Foo/$(Configuration)/$(Platform) and in Bar/$(Configuration)/$(Platform).
I’d like to know if there’s a way (from the command line or by editing project files) to make devenv build directly in the solution’s output directory and only there. Also, are there any reasons why I should/shouldn’t do such a thing?
Simply set the intermediate directory path in the .vcxproj files to the same as the solution output directory.
Assuming your projects don’t have the same output filename as each other there is no problem mixing intermediate directories. You can also set it to create all the intermediate directories under TEMP or on another drive.