如何获得此命令行脚本在TeamCity中工作? [英] How do I get this command line script to work in TeamCity?
问题描述
我终于有了一个msbuild来执行并通过命令行进行发布.现在我想知道如何通过teamcity做到这一点?
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 =属性\ PublishProfiles \ DEV.pubxml" /p:VisualStudioVersio n = 14.0
C:\TFS\project\myProject\APIproject>msbuild apiproject.csproj /p:DeployOnBuild=true /p:PublishProfile="Properties\PublishProfiles\DEV.pubxml" /p:VisualStudioVersio n=14.0
但是,我看不到TeamCity中运行此脚本的好方法.
However, I don't see a good solution in TeamCity to run this script.
推荐答案
请参见文档:添加"MsBuild"构建步骤并适当填充字段.您的命令行翻译为以下字段:
See the documentation: add an 'MsBuild' build step and populate the fields appropriately. Your commandline translated to these fields:
- 构建文件路径"相对/path/to/apiproject.csproj
- 'Targets'我猜是'Build',但默认情况下可以保留为空
- 命令行参数",您可以在此处指定所有属性,例如在命令行上. TeamCity可能会发出警告,因为您这样做是因为替代和首选方法是使所有这些属性成为TeamCity构建参数:TeamCity自动将构建参数传递给MsBuild.
这篇关于如何获得此命令行脚本在TeamCity中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!