使用 MSBUILD/TFS 2010/MSBuild.ExtensionPack 自动构建
我需要创建一个从 TFS 2010 开始的构建,并执行以下操作:
- 获取最新源
- 编译项目
- 检查 AssemblyInfo.cs 文件并使用 Msbuild.ExtensionPack 增加版本
- 中检查文件
- 在针对目标数据库部署数据库项目
- 运行单元测试
我正在考虑将所有这些步骤放入我的项目的 .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:
- Get latest source
- Compile the project
- Check AssemblyInfo.cs files out and increment the version using Msbuild.ExtensionPack
- Check the files back in
- Deploy the Database project against a target database
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在构建过程中签出或签入项目并不是一个好主意。顺便说一下,出于版本控制的目的,我使用 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.
我创建了一篇文章,介绍如何在不使用 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.