Delphi MSBuild Build Configurations From Command Line

谁都会走 提交于 2019-11-27 18:00:25

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.

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!