[英]Team foundation server build process for a C# ASP.net application to IIS
Having asked question : https://stackoverflow.com/posts/comments/38046411?noredirect=1 I have decided perhaps I am looking at this problem the wrong way round. 问了一个问题: https : //stackoverflow.com/posts/comments/38046411?noredirect=1我已经决定也许我正在错误地看待这个问题。
The aim is to have a build definition which will when run redeploy the C# ASP.net application to the IIS service which is currently running. 目的是要具有一个构建定义,该定义将在运行时将C#ASP.net应用程序重新部署到当前正在运行的IIS服务。
I can manually update the files in the directory for the application but this is a manual process. 我可以手动更新应用程序目录中的文件,但这是一个手动过程。 I was looking at perhaps working out how to execute a batch script from a TFS 2012 Express Build Process xaml workflow file but then considered surely TFS build workflow xaml must have a build element for publish / package / deploy a ASP.net application to a IIS service / directory already and I simply need to know what it is called and how to do it?
我正在研究也许正在研究如何从TFS 2012 Express Build Process xaml工作流文件执行批处理脚本,但是随后确定TFS生成工作流xaml必须具有一个build元素,用于将ASP.net应用程序发布/打包/部署到IIS。服务/目录已经存在,我只需要知道它叫什么以及怎么做?
Can anyone comment? 谁能评论?
I am using Team Foundation Server Express 2012. 我正在使用Team Foundation Server Express 2012。
My TFS build process edit screen looks like this: 我的TFS生成过程编辑屏幕如下所示:
I do this by using an InvokeProcess activity to call a powershell script. 我通过使用InvokeProcess活动来调用Powershell脚本来做到这一点。 The powershell script is stored in TFS, and will execute my WebDeploy package (that is built either earlier in the same build, or in a separate TFS Build).
powershell脚本存储在TFS中,并将执行我的WebDeploy程序包(该程序是在同一版本中的早期版本中构建的,或者在单独的TFS Build中构建)。
In TFS 2013 the default template (TfvcTemplate.12.xaml) contains hooks to easily call powershell scripts at various points in the workflow, without having to modify the workflow (you just specify the path in the build definition). 在TFS 2013中,默认模板(TfvcTemplate.12.xaml)包含钩子,可以轻松地在工作流中的各个点调用powershell脚本,而无需修改工作流(只需在构建定义中指定路径)。 I realize you aren't using 2013, so you'll still have to edit the workflow.
我知道您没有使用2013,因此您仍然必须编辑工作流程。 I just wanted to point out that this is considered a best practice, and MS has recognized that in TFS 2013 by making it even easier to do this.
我只是想指出,这被认为是最佳实践,MS已通过在TFS 2013中简化操作来认识到这一点。
A Build in Team Foundation Server is based on an XAML workflow that contains all the steps that are taken when the build runs. Team Foundation Server中的内部版本基于XAML工作流,其中包含运行内部版本时所采取的所有步骤。
In your screenshot, you see at the top that you are using the Default Template (DefaultTemplate.11.1.xaml) 在屏幕快照中,您会在顶部看到正在使用默认模板(DefaultTemplate.11.1.xaml)
This file is located in a folder in souce control called Build Definitions. 此文件位于源控件中名为“构建定义”的文件夹中。 Editing this file and checking your changes in changes the build workflow.
编辑此文件并检查您的更改会更改构建工作流程。
The steps required to do this can be found here: Create and Work with a Custom Build Process Template . 可以在此处找到执行此操作所需的步骤: 创建并使用自定义构建过程模板 。
Customizing your build process template is the recommended way of adding extra functionality to a build. 推荐自定义构建过程模板是向构建中添加其他功能的推荐方法。 As Dylan already pointed out, there is a lot of information in the community.
正如Dylan已经指出的那样,社区中有很多信息。 The ALM Rangers have provided guidance but also a set of TFS build extensions that you can use out of the box.
ALM Rangers提供了指导,还提供了一系列TFS构建扩展 ,您可以直接使用它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.