TFS和msbuild版本号与最近的变更集 [英] TFS and msbuild version number with last changeset

查看:132
本文介绍了TFS和msbuild版本号与最近的变更集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个类似Major.minor.Date.LastChangeSetInTFS的内部版本号,问题是如何从TFS中获取最后的变更集编号.有什么财产吗?

I want to create a build number which looks like Major.minor.Date.LastChangeSetInTFS, the problem is how to get last changeset number from the TFS. Is there any property, or something??

推荐答案

好吧,我终于找到了解决方案.这是一项任务,它将为您提供最新的变更集编号,并创建一个属性以将其插入到装配体信息内部版本号中.主要问题是缺少TfsLibraryLocation属性(没有它,它应该指向GAC中的库,但没有)

OK finally I've found a solution. Here's a task that will provide you the latest changeset number and create a property to insert it in an Assembly info build number. The main problem was in the missing TfsLibraryLocation property (without it, it should be pointing to libraries in GAC, but it didn't)

<Target Name="GetVersionChangeSet">
<TfsVersion
  TfsLibraryLocation="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies"      
  LocalPath="$(SolutionRoot)">
  <Output TaskParameter="Changeset" PropertyName="ChangesetNumber"/>
</TfsVersion>
<Message Text="TFS ChangeSetNumber: $(ChangesetNumber)" />

这篇关于TFS和msbuild版本号与最近的变更集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆