问题描述
我想要这些版本的格式
像这样.. {Major}.{Minor}.{Build}.{patch}
like this.. {Major}.{Minor}.{Build}.{patch}
如何在团队城市的装配信息补丁中设置?
how to set this in the assembly info patcher in team city?
这样它每次构建时都会自动增加版本...
so that it will automatically increment the versions for each time it builds...
我需要一些指导和帮助...?!?
i want some guidance and help in this...?!?
推荐答案
TeamCity 可以使用 AssemblyInfo Patcher 构建功能为您版本程序集.要利用这一点:
TeamCity can version assemblies for you with the AssemblyInfo Patcher build feature. To take advantage of this:
- 创建一个名为
%Major.Minor%
的构建参数.手动将其设置为某个值,例如1.0
. - 在General Settings标签上,将
Build number format
设置为%Major.Minor%.%build.vcs.number%.%build.counter%
. - 在构建步骤选项卡上,滚动到页面底部的附加构建功能.添加 Assembly Info Patcher 构建步骤.它将默认使用您在第 2 步中定义的
%system.build.number%
.
- Create a build parameter called
%Major.Minor%
. Set this manually to some value, e.g.1.0
. - On the General Settings tab, set the
Build number format
to%Major.Minor%.%build.vcs.number%.%build.counter%
. - On the Build Steps tabe, scroll to the Additional Build Features at the bottom of the page. Add an Assembly Info Patcher build step. It will default to using the
%system.build.number%
, which you've defined in step 2.
这将导致您的所有程序集都使用 %system.build.number%
进行版本控制,其中包括主要和次要版本、VCS 修订版和 TeamCity 的增量构建号.
This will result in all of your assemblies being versioned with the %system.build.number%
, which includes the Major and Minor version, the VCS revision, and TeamCity's incremental build number.
这篇关于Team City 中的程序集版本和 Dll 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!