在TFS Build Server中部署生成的文件 [英] Deploy generated files in TFS Build Server

查看:202
本文介绍了在TFS Build Server中部署生成的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用TFS Build Server进行持续集成。构建的结果是部署了与MSBuild集成的Publish功能的Web应用程序。我们在构建服务器上生成,在构建启动(预构建事件)之前,一个最小化的JavaScript文件,它在构建机器上的源目录中复制。遗憾的是这些都没有在IIS中发布,要么在发布网站文件夹。

We use TFS Build Server on continuous integration. The result of build is web application which is deployed with Publish functionality integrated with MSBuild. We generate on build server, before build starts (Pre-build event), a minimized JavaScript files, which are copied in source directory on build machine. Sadly these aren't published in IIS, either are in Published Web Sites folder. How can wen accomplish this with Publish possibilities in TFS?

我们尝试:
我们尝试改变工作流程(默认模板 - >在代理上运行),但是,我们太晚了

What we tried: We tried change the workflow (default template -> run on agent), but we are too late

我们的替代方法是:
当其他可能性失败时,我们会做XCopy,但我们想使用发布函数

What is our alternative: We would do XCopy when other possibilities will fail, but we would like to use Publish function

请详细描述解决方案,一步一步,因为我阅读了许多教程,但他们解释不深入。最简单的解决方案。 ; - )

Please, describe the solution precisely and step by step, because I read many of the tutorials but they explain it not in depth. The simplest solution win. ;-)

推荐答案

我们修复了以下方式:


  • 我们还在对应的项目中包括最小化的javascript文件。 (需要在发布过程中部署最小文件。)

  • We also include the minimized javascript files in the corresponding project. (that's needed that the min files also get deployed during the publish process.)

在预构建事件中,我们删除所有最小化的JavaScript文件,如:
del / F$(ProjectDir)JavaScript * .min.js(/ F是必需的,只读文件也被删除)

In the Pre-Build event we delete all minimized javascript files like so: del /F "$(ProjectDir)JavaScript*.min.js" (/F is needed that also readonly files get deleted)

这是它。

br
rene_r

br rene_r

这篇关于在TFS Build Server中部署生成的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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