TFS 2015 Visual Studio Build-Package .zip未创建 [英] TFS 2015 Visual Studio Build - Package .zip not being created

查看:97
本文介绍了TFS 2015 Visual Studio Build-Package .zip未创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建解决方案并将Web应用打包到要部署的Web部署(.zip)包中.

I'm trying to build my solution and package up the web app into a web deploy (.zip) package to be deployed.

我在 Visual Studio Build 步骤中添加了以下MSBuild参数:

I've added the Visual Studio Build step with the following MSBuild Arguments:

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

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

我已经设置了复制并发布构建工件步骤,将所有.zip文件复制到放置文件夹中.

And I've set up the Copy and Publish Build Artifacts step to copy all .zip files to the drop folder.

构建成功完成,但没有任何副本复制到放置文件夹,因为没有创建的.zip软件包.

The build completes successfully but nothing is copied to the drop folder because there are no .zip packages that get created.

因此,当我查看TFS服务器时,"a"文件夹中唯一的东西是一个空的"drop"文件夹.在"s"文件夹中是解决方案目录,其中包含PrecompiledWeb文件夹.不知道那是什么,但看起来与部署程序包不一样(而且它不是.zip).

So when I look on the TFS server, the only thing in the 'a' folder is an empty 'drop' folder. And in the 's' folder is the solution directory with a PrecompiledWeb folder in it. Not sure what that is but it doesn't look like the deployment package (and it's not a .zip).

有什么想法吗?

推荐答案

我在同时使用VSTS和TFS 2015.2.1的VS2015 MVC Web应用程序上尝试了相同的方法.我必须对Visual Studio构建中的Build参数做些微更改.那就是删除/p:PackageLocation ="$(build.artifactstagingdirectory)\"中的结尾"\".

I have tried the same on VS2015 MVC web application using VSTS and TFS 2015.2.1 both. I had to do a slight change to the Build arguments in Visual Studio build. That is removing the trailing "\" in /p:PackageLocation="$(build.artifactstagingdirectory)\".

这是我传递给Visual Studio构建步骤的参数

Here is the argument I passed to Visual studio build step

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

然后,我使用了复制和发布的构建工件"(在VSTS中已弃用,您应该使用复制"任务和发布"任务而不是此任务),如下所示:

Then I used Copy and Published Build Artifacts (Deprecated in VSTS you should use Copy task and Publish task instead of this task) as shown below

这给了我如下输出.

这篇关于TFS 2015 Visual Studio Build-Package .zip未创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆