Team city MSBuild排除多个文件

Team city MSBuild排除多个文件,msbuild,teamcity,Msbuild,Teamcity,我有以下命令行参数。这是团队城市建设步骤。我需要排除web.config和robots.txt /p:DeployOnBuild=True /p:PublishProfile=OffCycleDevelopmentRemoteDeployment /p:ProfileTransformWebConfigEnabled=False /p:VisualStudioVersion=12.0 /p:ExcludeFilesFromDeployment=Web.config;robots.txt 当我试

我有以下命令行参数。这是团队城市建设步骤。我需要排除web.config和robots.txt

/p:DeployOnBuild=True
/p:PublishProfile=OffCycleDevelopmentRemoteDeployment
/p:ProfileTransformWebConfigEnabled=False
/p:VisualStudioVersion=12.0
/p:ExcludeFilesFromDeployment=Web.config;robots.txt
当我试图“运行”项目时,我的构建失败了

[15:34:30]Step 1/1: Visual Studio Build and Publish (Visual Studio (sln)) (1s)
[15:34:30][Step 1/1] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:C:\TeamCity\buildAgent\work\McoMobile-OffCycle "/msbuildPath:C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe"
[15:34:30][Step 1/1] in directory: C:\TeamCity\buildAgent\work\McoMobile-OffCycle
[15:34:31][Step 1/1] MSBuild command line parameters contain "/property:" or "/p:". It is recommended to define System Property on Build Parameters instead.
[15:34:31][Step 1/1] Process exited with code 1
[15:34:31][Step 1/1] MSBuild output
[15:34:31]Start MSBuild...
[15:34:31]'C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe' '"@C:\TeamCity\buildAgent\work\Mobile-OffCycle\Mobile.sln.teamcity.msbuild.tcargs" "C:\TeamCity\buildAgent\work\Mobile-OffCycle\Mobile.sln.teamcity"'
[15:34:31]working dir = 'C:\TeamCity\buildAgent\work\Mobile-OffCycle'
[15:34:31]Microsoft (R) Build Engine version 12.0.30723.0
[15:34:31][Microsoft .NET Framework, version 4.0.30319.18408]
[15:34:31]Copyright (C) Microsoft Corporation. All rights reserved.
[15:34:31]
[15:34:31]MSBUILD : error MSB1006: Property is not valid.
[15:34:31]Switch: robots.txt
[15:34:31]
[15:34:31]For switch syntax, type "MSBuild /help"
[15:34:31][Step 1/1] Step Visual Studio Build and Publish (Visual Studio (sln)) failed
如果我只保留一个文件,则不会发生错误

/p:ExcludeFilesFromDeployment=Web.config
如何在此处指定多个文件

我尝试了以下内容,但这是我的文件发布到网站

/p:ExcludeFilesFromDeployment=Web.config
/p:ExcludeFilesFromDeployment=robots.txt

您需要引用属性值,例如
/p:ExcludeFilesFromDeployment=“Web.config;robots.txt”

还可以查看是否需要将属性值转换为项目列表


我不确定您在哪里找到属性ExcludeFilesFromDeployment,但我假设它正在工作,并且有一个MSBuild目标来处理预期行为。

谢谢!不久前,当我通过TeamCity建立我的第一个自动构建时,我通过谷歌搜索找到了它。