Automate Delphi 2010 project build with MSBuild

前端 未结 2 470
情歌与酒
情歌与酒 2021-02-08 02:45

I\'m looking to compile my Delphi 2010 project using MSBuild, but something isn\'t right, I just couldn\'t make MSBuild to compile my project.

I tried this command line:

2条回答
  •  既然无缘
    2021-02-08 03:43

    You need to switch the parameters. The target parameter (/t) tells MSBuild which target to create. This can be either 'Make', 'Clean' or 'Build' (or a combination of those - seperate them with ';' in this case).

    The property parameter (/p) forwards properties to the actual compiler. You can specify for example the configuration using /p:config=

    So if you want to clean and then build a project using the release configuration, specify the paramters like this:

    msbuild.exe "/t:Clean;Build" "/p:config=Release" Myapp.dproj
    

提交回复
热议问题