What are “solution configurations” in visual c++ 2005/2008?
This example builds the project CSharpConsoleApp, using the Debug project build configuration within the Debug solution configuration of MySolution.
devenv "C:\Documents and Settings\someuser\My Documents\Visual Studio\Projects\MySolution\MySolution.sln" /build Debug /project "CSharpWinApp\CSharpWinApp.csproj" /projectconfig Debug
I am confused what a solution configuration is and how it differs/relates to a project configuration. In one of our build scripts we have lines like:
devenv ..\ProjectX.vcproj /build ReleaseUniCode /project ProjectX /projectconfig "ReleaseUniCode|Win32" /out ..\BuildLogs\build_ProjectX.log
But that doesn't match MSDN's example and still seems kind of redundant, can anyone help me understand more clearly?
A solution configuration is substantially a set of project configurations settings, i.e. a quick way to build a project with a particular configuration setting for each project.
For example, you may have a solution containing a GUI application and several library that it uses; all the projects may have a "static library" and "dynamic library" project configuration (to build the libraries as .lib or .dll for the library projects, to do static/dynamic linking against the libraries for the GUI project). In such a case, you will probably want to have a "static" and "dynamic" solution configuration to build all the projects in one or the other configuration and obtain as a result of the build either one big fat exe or a lean exe and several dlls.
Other "classic" uses are to manage Unicode/ANSI builds of all the projects, or to have custom debug/release configurations between various projects (if I am using a well tested library I may want to compile it always in "release" mode, but instead having the debug/release builds of my main program, so I will set my solution configurations "debug" and "release" to affect only the main project and not the library).
A solution is little more than a collection of projects, with mappings from solution configurations to project configurations. See the Configuration Manager dialog under the Build menu (VS 2012) for how the mappings are managed.