Automate Delphi 2010 project build with MSBuild

前端 未结 2 471
情歌与酒
情歌与酒 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:41

    Change /p:Configuration=Release to /p:config=Release

    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题