使用 MSBUILD/TFS 2010/MSBuild.ExtensionPack 自动构建

发布于 2024-09-25 17:07:11 字数 585 浏览 2 评论 0原文

我需要创建一个从 TFS 2010 开始的构建,并执行以下操作:

  1. 获取最新源
  2. 编译项目
  3. 检查 AssemblyInfo.cs 文件并使用 Msbuild.ExtensionPack 增加版本
  4. 中检查文件
  5. 在针对目标数据库部署数据库项目
  6. 运行单元测试

我正在考虑将所有这些步骤放入我的项目的 .csproj 文件之一中,并使用团队资源管理器从 Visual Studio 安排构建。这是一个好的策略吗? 为此做准备,我测试了 MSBuild.ExtensionPack.VistualStudio.TfsSource Checkout,并且我的程序集文件出现错误,并显示以下消息:

c:\_dev\NDA\API\API.csproj:警告 :退出代码 1。部分成功:否 找到的匹配项 c:\_dev\nda\API\Properties\AssemblyInfo.cs 在您的工作空间中。

但是,如果我从命令行运行 tf checkout,它就可以正常工作。什么可能导致此错误?

谢谢!

I need to create a build that is schedule from TFS 2010 and does the following:

  1. Get latest source
  2. Compile the project
  3. Check AssemblyInfo.cs files out and increment the version using Msbuild.ExtensionPack
  4. Check the files back in
  5. Deploy the Database project against a target database
  6. Run unit tests

I am thinking of putting all these steps into one of my project's .csproj files and scheduling the build from Visual Studio using Team Explorer. Is this a good strategy?
In preparation to this, I tested out the MSBuild.ExtensionPack.VistualStudio.TfsSource Checkout, and I get an error on my assembly files with the following message:

c:\_dev\NDA\API\API.csproj : warning
: Exit Code 1. Partial success: No
matching items found in
c:\_dev\nda\API\Properties\AssemblyInfo.cs
in your workspace.

However, if I run tf checkout from command line, it works fine. What could be causing this error?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

赤濁 2024-10-02 17:07:11

在构建过程中签出或签入项目并不是一个好主意。顺便说一下,出于版本控制的目的,我使用 Jim Lamb 的 ActivityPack 描述 此处。它对我来说非常有效。

It's not a good idea to check-out or check-in items during a build process. By the way for versioning purposes I use Jim Lamb's ActivityPack described here. It works very well for me.

伴我老 2024-10-02 17:07:11

我创建了一篇文章,介绍如何在不使用 MSBuild 扩展包的情况下增加程序集版本:http://www.ewaldhofman.nl/post/2010/05/13/Customize-Team-Build-2010-e28093-Part-5-Increase -AssemblyVersion.aspx

如何部署数据库项目仍然在我的待办事项中,需要添加到该系列中。因此,如果您找到解决方案,请通知我。

I have created a post how you can increase the assemblyversion without using the MSBuild Extension Pack: http://www.ewaldhofman.nl/post/2010/05/13/Customize-Team-Build-2010-e28093-Part-5-Increase-AssemblyVersion.aspx

The how-to deploy a database project is still on my backlog to add to the series. So if you find the solution, please inform me.

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