How do I get this command line script to work in TeamCity?

坚强是说给别人听的谎言 提交于 2019-12-25 07:29:09

问题


I finally got a msbuild to execute and do a publish through the command line. Now I'm wondering how do I do that via teamcity?

When I run this command line it works!

C:\TFS\project\myProject\APIproject>msbuild apiproject.csproj /p:DeployOnBuild=true /p:PublishProfile="Properties\PublishProfiles\DEV.pubxml" /p:VisualStudioVersio n=14.0

However, I don't see a good solution in TeamCity to run this script.


回答1:


See the documentation: add an 'MsBuild' build step and populate the fields appropriately. Your commandline translated to these fields:

  • 'Build file path' relative/path/to/apiproject.csproj
  • 'Targets' I'm guessing 'Build' but can be left empty for the default
  • 'Command line parameters' here you can specify all properties like on the commandline. TeamCity might emit warnings because you do so, because the alternative and preferred way is to make all these properties TeamCity build parameters: TeamCity passes build parameters to MsBuild automatically.


来源:https://stackoverflow.com/questions/37281987/how-do-i-get-this-command-line-script-to-work-in-teamcity

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