Question

I'd like to build all the configurations of a VS 2008 C++ project on the command line. Something like:

devenv TheProject.vcproj /build /nologo

But this doesn't work because the /build command insists on having a configuration following it like this:

devenv TheProject.vcproj /build "Release|Win32" /nologo

Is there a way to get a command line build of all configurations within the vcproj file?

Was it helpful?

Solution

I was thinking you can do what you want with MSBUILD, but it appears that it isn't much better for this than DEVENV.

You still have to specify each configuration on the command line, although it would be easy to write a batch file to accomplish this with either MSBUILD or DEVENV.

It looks like previous versions of the development environment may have supported an "ALL" option, but VS 2008 does not.

http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/8701b3d0-d5c9-45fb-8dd4-e7700c8caca6/

OTHER TIPS

Not directly, but you can have projects depend on other projects - so you could have an 'all' or 'install' project with a dependacy of everything else.

Haven't used VS in a long time. But the project properties panel used to show the command line generated for linking and compiling a project for a particular configuration. It used to be under the Advanced tab. Will using that directly from the command line serve your purpose? This method will not use the VS IDE at all.

Alternatively,

Steps:

  1. Create a project which has a dependency on all other projects.

  2. Write a script which builds this project with different configurations sequentially. You cannot create a single configuration which encapsulates all other configurations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top