TFS 和 msbuild 版本号与最后一个变更集 [英] TFS and msbuild version number with last changeset
问题描述
我想创建一个看起来像 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 FilesMicrosoft Visual Studio 9.0Common7IDEPrivateAssemblies"
LocalPath="$(SolutionRoot)">
<Output TaskParameter="Changeset" PropertyName="ChangesetNumber"/>
</TfsVersion>
<Message Text="TFS ChangeSetNumber: $(ChangesetNumber)" />
这篇关于TFS 和 msbuild 版本号与最后一个变更集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!