TeamCity says to use “Build Parameters” instead of “/property:” in an MSBuild step. What does that mean?

前端 未结 2 1539
礼貌的吻别
礼貌的吻别 2020-12-07 14:13

I have a TeamCity server setup to do my CI builds. I\'m building and testing a C# solution and running some custom MSBuild tasks. One of these tasks is printing a warning in

相关标签:
2条回答
  • 2020-12-07 14:49

    You have to add Build Parameters under Properties and environment variables in the configuration

    `enter image description here

    So in the command line parameters in the Build Step for MSBUild, remove any property that is specified as /p: and add each of those to the Build Parameters ( screenshot above) and give the values

    0 讨论(0)
  • 2020-12-07 14:50

    It all happens behind the scenes! You just have to follow the right conventions. In your MSBuild script, you use the regular variable notation

    $(DbPath)
    

    And in TeamCity, you define a system or env variable

    system.DbPath
    

    TeamCity will automagically send all of its system/env variables to your MSBuild task, removing the 'system' or 'env' part. And you don't have to write /property:DbPath=system.DbPath in your TeamCity task.

    0 讨论(0)
提交回复
热议问题