TFS 2010:将_PublishedWebsites复制到测试服务器 [英] TFS 2010: Copy _PublishedWebsites to test server

查看:219
本文介绍了TFS 2010:将_PublishedWebsites复制到测试服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到类似的问题和答案,但发现他们不是真正的我想要的。



我有一个大型解决方案,其中有几个Web项目。所有的Web项目共享一些常见的代码,所以它们都是同一个解决方案的一部分(有一个常见的项目被所有的引用)。



在Team Foundation Server 2008上运行,我们正在升级到TFS 2010,以准备我们迁移到visual studio 2010和.net 4.0。



我已经建立了通过创建一个新的构建工作,通过创建一个新的构建,因为我只有一个自定义我想要重现。



一旦构建完成,我将文件转储在

  \\SERVER\tfsdump\devel2010 build\devel2010 build_20101008.3\_PublishedWebsites 

通过使用转储文件夹选项,但构建位置是

  C:\Builds\1\Web Applications\devel2010 build\Binaries\_PublishedWebsites 

我想做的是在构建完成后,我想复制_Published网站\SiteA到\ServerA\ShareA
并将_PublishedWebsites\SiteB复制到\ServerB\ShareB



因为只有一个构建代理所有我需要的是调用一个批处理文件来运行副本,但是为了方便我的开发人员使用,我需要这个批处理文件在每次构建后被调用。这是可能的还是有更好的解决方案?



为了使事情变得更加困难,该网站仍然是一个2008年的项目,并要求它保持这种方式,直到我们能够完全测试它在VS 2010下。

解决方案

使用 CopyDirectory $ code>属性等于 BuildDetail.DropLocation +\_PublishedWebsites\SiteA并设置目的地属性到您所需的位置。我已将此活动作为构建过程中的最后一个活动,并且正常工作。


I've seen similar questions and answers but found them not really what I want.

I have a large solution with several web projects in it. All the web projects share some common code so they are all part of the same solution (there is a common project that is referenced by all of them).

I've been running on Team Foundation Server 2008 and we are upgrading to TFS 2010 to be ready for our move to visual studio 2010 and .net 4.0.

I've got the build working with a 2010 build by creating a new build because we only had one customization I'm trying to reproduce.

Once the build is done I have the files dumped at

\\SERVER\tfsdump\devel2010 build\devel2010 build_20101008.3\_PublishedWebsites

by using the dump folder option but the build location is

C:\Builds\1\Web Applications\devel2010 build\Binaries\_PublishedWebsites

All I want to do is after the build is finished I want to copy _PublishedWebsites\SiteA to \ServerA\ShareA and copy _PublishedWebsites\SiteB to \ServerB\ShareB

Because there is only one build agent all I need is to call a batch file to run the copy but for easy of use for my developers I need this batch file to be called after every build. Is this possible or is there a better solution?

To make things harder the site is still a 2008 project and it is requested that it stays that way until we can fully test it under VS 2010.

解决方案

Use a CopyDirectory build activity, set Source property equal to BuildDetail.DropLocation + "\_PublishedWebsites\SiteA" and set Destination property to your desired location. I have put this activity as the last activity in build process and it works properly.

这篇关于TFS 2010:将_PublishedWebsites复制到测试服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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