Delphi MSBuild Build Configurations From Command Line
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:
SET BDS=C:\Program Files (x86)\Embarcadero\RAD Studio\8.0
SET BDSBIN=C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\bin
SET BDSAPPDATABASEDIR=BDS
msbuild myproject.dproj /target:Build /p:config=Release
Now, if you want to change the build configuration you have to add the parameter
/p:config=<BUILD_CONFIG_NAME
>
For example:
C:\Projects\TestDelphiApp001>msbuild /target:Build /p:config=Release
or
C:\Projects\TestDelphiApp001>msbuild /target:Build /p:config=Debug
Copied from original "question"; note community wiki.