程序集版本控制构建号格式 [英] Assembly versioning Build number format
问题描述
大家好,
我创建了一个构建定义,其构建号格式为 $(BuildDefinitionName)_ $(MajorVersion)。$(MinorVersion)。$ (年:yy)$(DayOfYear)$(版本:.rr)
I have created a build definition having build number format as $(BuildDefinitionName)_$(MajorVersion).$(MinorVersion).$(Year:yy)$(DayOfYear)$(Rev:.rr)
以上版本号格式工作正常。现在的问题是,每当我将上面的内部版本号格式更改为其他格式时,
$(Rev:.rr)值重置为1,然后每次新构建时开始增加1排队。
Above build number format is working fine. Now the problem is that whenever I change above build number format to other format, the $(Rev:.rr) value reset to 1 and then starts increasing by 1 each time new build is Queued.
增加1是预期行为,我对此感到满意。但在更改内部版本号格式后,我不想重置
$(Rev:.rr)的值。并希望保留以前的修订版号并继续增加后续版本的修订版。
Increment by 1 is expected behavior and i am ok with this. But I don't want to reset the value of $(Rev:.rr) after making changes to build number format. And want to maintain previous Revision number and continue increasing revision in successive build.
即使在更改内部版本号格式后,如何维护修订版本?
How can I maintain my Revision version even after making change in build number format ?
请帮助我。
谢谢。
推荐答案
您好Vishwajeet,
Hi Vishwajeet,
感谢您在此发帖。
不幸的是,这是不可能的。
Unfortunately, it's impossible.
每个构建定义都有一个构建号格式字段,您可以使用某些宏来指示生成的构建号应该是什么样子。在这种格式中我们使用
Every build definition has a build number format field where you can use some macros to dictate what the resulting build number should look like. In this format we are using
(Rev:.rr)它的开头是一个。
(Rev:.rr) Its start by one.
什么是Rev? 
使用
(Rev:.rr)确保每个已完成的构建都具有唯一的名称。构建完成后,如果构建号中没有其他内容发生更改,则Rev整数值将增加1。请参阅
本文有关详细信息。
(Rev:.rr) to ensure that every completed build has a unique name. When a build is completed, if nothing else in the build number has changed, the Rev integer value is incremented by one. Please see this article for details.
此外,如果要生成不增加的自定义内部版本号。这是一个包含详细程序的博客:
生成自定义内部版本号TFS Build vNext 。
Moreover, if you want to generate a custom build number without increment. Here is a blog with detailed procedures: Generate custom build numbers in TFS Build vNext.
最诚挚的问候。
这篇关于程序集版本控制构建号格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!