如何创建 TFS2010 Team Build 模板以获取源代码并调用 msbuild.exe

发布于 2024-09-13 07:52:43 字数 291 浏览 1 评论 0原文

我有一个 build.proj,它是一个 MSBuild 文件,可以在本地运行。

我需要从 TFS 获取的只是

  1. 从 TFS 源代码管理中获取源代码。
  2. 调用“MSBuild.exe /t:Deploy”。
  3. 根据 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

  1. Get the sources from TFS Source Control.
  2. Call "MSBuild.exe /t:Deploy".
  3. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冧九 2024-09-20 07:52:43

如果您在使用 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.

神也荒唐 2024-09-20 07:52:43

您应该使用默认模板。我有同样的问题,我用这种方法解决了。
您也可以使用 UpgradeTempate 来完成此操作,但使用 DefaultTemplate 对我来说更容易。

在“进程”部分中,请按照以下步骤操作:

  1. 选择默认模板
  2. 将项目添加到“要生成的项目”集合中
  3. 将 MSBuild 参数(高级部分)设置为“/t:Deploy”

我有用于在本地运行生成的 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:

  1. Select Default template
  2. Add your project into Items To Build collection
  3. Set MSBuild Arguments (Advanced section) to "/t:Deploy"

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文