TFS构建下Binaries\_PublishedWebsites目录的用途是什么 [英] What is the purpose of Binaries\_PublishedWebsites directory under TFS build

查看:115
本文介绍了TFS构建下Binaries\_PublishedWebsites目录的用途是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TFS在构建代理工作目录下生成一个发布目录:

TFS generates a publish directory under the build agent working directory:

Z:\TFSBuilds\1\box\CT\Binaries\\_PublishedWebsites

我假设这是自动生成TFS的地方发布网站。我如何将其用于网站的自动发布...如我们应将IIS网站引用到此目录。

I am supposing that this is where TFS is automatically publishing the site. How can I use it for auto publishing of sites... as Should we refer our IIS website to this directory. What is the purpose of it?

推荐答案

首先,工作目录顾名思义就是工作目录。这是构建代理下载源代码,执行编译等的地方。每当您再次运行构建时,它也会清除工作目录,因此当您尝试从工作目录中检索时,可能会冒未完成的工件的风险。

Firstly, the working directory is as the name says, a "working" directory. That is where the build agent downloads the source, perform compiles etc. It also clears the working directory whenever you run the build again so you risk grabbing unfinished artifacts when you try to retrieve from the working directory.

TFS定义了一个放置文件夹,一旦构建完成,它将把最终的工件复制到其中。您可以通过编辑构建定义来定义放置文件夹:

TFS defines a "drop folder" that it will copy the final artifacts to, once the build completes. You can define the drop folder for a build by editing it's build definition:


  1. 右键单击该构建,然后选择编辑构建定义。 / li>
  2. 选择构建默认值部分。

  3. 勾选此构建将输出文件复制到放置文件夹中

  4. 为构建代理输入UNC路径以将工件复制到(确保构建代理可以访问该UNC路径!)

其次,关于_Published网站。构建代理将为其构建的每个Web项目创建一个_PublishedWebsites文件夹,作为其构建构件的一部分(因此,如果您告诉它使用2个Web项目构建解决方案,它将创建[Project name A] \_PublishedWebsites和[Project名称B] \_Published网站)。每个_PublishedWebsites文件夹中都有要放入IIS应用程序的内容,这与右键单击Web项目并选择发布所获得的内容相同。我通常在构建工作流中添加最后一步,以将_PublishedWebsites文件夹的内容复制到所需的IIS目录中。

Secondly, in regard to _PublishedWebsites. The build agent will create a _PublishedWebsites folder for each Web project it builds as part of its build artifacts (so if you tell it to build a solution with 2 web projects, it'll create [Project name A]\_PublishedWebsites and [Project Name B]\_PublishedWebsites). Inside each _PublishedWebsites folder are the contents to be dropped into an IIS application, same as what you would get by right clicking on a web project and selecting 'Publish'. I normally add a last step in the build workflow to copy the contents of this _PublishedWebsites folder to my desired IIS directory.

此链接告诉您如何添加复制工作流程: TFS 2010:将_PublishedWebsites复制到测试服务器

This link tells you how to add the copy workflow: TFS 2010: Copy _PublishedWebsites to test server

以下是放置文件夹的更多信息: http://msdn.microsoft.com/en-us/library/bb778394.aspx

And here's more on drop folders: http://msdn.microsoft.com/en-us/library/bb778394.aspx

这篇关于TFS构建下Binaries\_PublishedWebsites目录的用途是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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