Delphi 2009 uses build configurations. When you create a new project you have two default build configurations "Debug" and "Release".
Now I asked myself how to automate builds using MSBuild (which is supported by Delphi since version 2007).
You can start the "msbuild" command in the "RAD Studio Command Prompt" in some Delphi project directory and it will build the default build configuration (the last activated build configuration inside the Delphi IDE).
Now, I want to specify a certain (non-default) build configuration by a command line parameter.
The Delphi help asserts that the parameter is [/p:configuration=<configuration name
>], which is wrong (Delphi 2009, Help Update 1)!
What is the right way?
I tried this with Delphi XE. It didn't work until I figured out I needed to set the environment variables referenced by the
.dproj
file:Now, if you want to change the build configuration you have to add the parameter
/p:config=
<BUILD_CONFIG_NAME
>For example:
or
Copied from original "question"; note community wiki.
I've had the same problem and found the solution:
1) Write /p:config instead of /p:configuration 2) Write "Release Build" or "Debug Build" (in double quotes) instead of Release or Debug
It did it for me.