如何创建 TFS2010 Team Build 模板以获取源代码并调用 msbuild.exe
我有一个 build.proj,它是一个 MSBuild 文件,可以在本地运行。
我需要从 TFS 获取的只是
- 从 TFS 源代码管理中获取源代码。
- 调用“MSBuild.exe /t:Deploy”。
- 根据 MSBuild 的结果更新构建状态。
我尝试制作一个结合 DefaultTemplate.xaml 和 UpgradeTemplate.xaml 的模板。
但到目前为止,还没有运气:-(
有人可以帮我制作这个模板吗?
I have a build.proj, that is a MSBuild file and can be run locally.
All I need from TFS is
- Get the sources from TFS Source Control.
- Call "MSBuild.exe /t:Deploy".
- Update the build status based on the result of MSBuild.
I have tried to make a template combining the DefaultTemplate.xaml and UpgradeTemplate.xaml.
But so far, no luck :-(
Can someone help me make this template?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您在使用 2010 创建新的 TFS 项目时选择现成的升级模板,则可以毫无问题地提供旧的 TFS2008 proj (MSBuild) 文件。请阅读http://msdn.microsoft.com/en-us/library/dd647553 .aspx 了解更多详细信息。
If you select the upgrade template that comes out of the box when you create a new TFS project with 2010, you can supply your old TFS2008 proj (MSBuild) file without problems. Please read http://msdn.microsoft.com/en-us/library/dd647553.aspx for more details.
您应该使用默认模板。我有同样的问题,我用这种方法解决了。
您也可以使用 UpgradeTempate 来完成此操作,但使用 DefaultTemplate 对我来说更容易。
在“进程”部分中,请按照以下步骤操作:
我有用于在本地运行生成的 MSBuild 项目文件。该脚本也用于服务器构建。我在 Items To Build 集合中有三个 MSBuild 项目。一个用于预构建步骤(执行构建之前的一些检查),主构建脚本也用于本地构建,最后一个脚本用于其他构建后任务(部署过程)。我正在 MSBuild 参数中设置其他 MSBuild 属性,例如 IncrementalBuild 和 ServerBuild 属性。
You should use DefaultTemplate. I had the same problem and I solved it this way.
You can do it using UpgradeTempate also, but using DefaultTemplate was easier for me.
On Process section follow these steps:
I have MSBuild project file for running builds locally. This script is used also for sever builds. I have three MSBuild projects in Items To Build collection. One for PreBuild step (some checks before build is executed), main build script used also for local build and the last script for additional post build tasks (deploy process). I'm setting additional MSBuild propertires like IncrementalBuild and ServerBuild properties in MSBuild Arguments.