2016-08-29 158 views
0

我在Visual Studio Team Services(以前是Visual Studio Online)中构建一个使用内部部署代理构建ASP.NET Web应用程序的构建定义。该代理安装了VS2012以及所有其他必要的先决条件来协助构建应用程序。然而,在运行时所建,它失败,并输出如下错误:VSTS构建失败 - 错误:Web部署任务失败

C:\Program Files x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4021,2): Error : Web deployment task failed. (The .zip file package 'C:\BuildAgent\_work\1\a\' must be a file, not a directory.)
Process 'msbuild.exe' exited with code '1'.

我试着用VS2012建立代理计算机上的项目,它建立的罚款。另外,我已经定义了以下构建定义是一样的我的其他构建使用托管代理的MSBuild参数:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\" 

可能是什么这个问题的原因是什么?我需要额外安装任何东西吗?

+0

哪个任务失败?看起来这在部署期间失败了,而不是构建 –

回答

1

您正在使用VS2012,需要使用.zip后缀($(build.artifactstagingdirectory)\ testWeb.zip)指定详细的PackageLocation参数。如果您使用的是更高版本的VS/MSBuild(例如vs 2015),则文件夹路径无问题,它会将[XXX] .zip添加到该路径的末尾。

相关问题