.Net AssemblyName.version 构建与修订
MSDN 文档指出:
版本号由二到四组成 组件:主要、次要、构建和 修订。主要和次要 需要组件;构建和 修订组件是可选的,但是 构建组件是必需的,如果 修订版组件已定义。全部 定义的分量必须是整数 大于或等于0。
版本号的格式为 如下(显示可选组件 方括号([ 和 ])中: 主要.次要[.build[.revision]] 的 按照惯例,组件的使用方式为 如下:
专业:同名程序集 但不同的主要版本不是 可互换。更高版本 数字可能表明重大重写 落后的产品 无法假定兼容性。
未成年人:如果姓名和专业 两个程序集的版本号是 相同,但次要版本号 不同,这表明 显着增强与 向后兼容的意图。 这个较高的次版本号可能 表示产品的点发布 或完全向后兼容的新 产品的版本。
内部版本:内部版本号不同 代表相同的重新编译 来源。不同的内部版本号可能 当处理器、平台、 或编译器更改。
修订:具有相同内容的程序集 名称、主要版本号和次要版本号 但有意进行不同的修改 可以完全互换。更高的 修订号可能会被用在 修复了一个安全漏洞的构建 之前发布的程序集。
程序集的后续版本 仅因构建或修订而有所不同 数字被认为是修补程序 先前版本的更新。
我的问题是关于此上下文中术语“构建”和“修订”的含义。
在我看来,一般来说,当源代码发生变化时,我们会进行“构建”。因此,“build 678”和“build 679”是不同的,正是,因为源在某种程度上不同 - 通常是由于签入某些更改的源而导致的。在我看来,.NET 定义以通常使用“构建”的方式使用“修订”。
有人在版本控制中使用上面的定义吗?如果是这样,您能举出具体的例子说明为什么这样做吗?
The MSDN documentation states:
Version numbers consist of two to four
components: major, minor, build, and
revision. The major and minor
components are required; the build and
revision components are optional, but
the build component is required if the
revision component is defined. All
defined components must be integers
greater than or equal to 0.The format of the version number is as
follows (optional components are shown
in square brackets ([ and ]):
major.minor[.build[.revision]] The
components are used by convention as
follows:
Major: Assemblies with the same name
but different major versions are not
interchangeable. A higher version
number might indicate a major rewrite
of a product where backward
compatibility cannot be assumed.Minor: If the name and major
version number on two assemblies are
the same, but the minor version number
is different, this indicates
significant enhancement with the
intention of backward compatibility.
This higher minor version number might
indicate a point release of a product
or a fully backward-compatible new
version of a product.Build: A difference in build number
represents a recompilation of the same
source. Different build numbers might
be used when the processor, platform,
or compiler changes.Revision: Assemblies with the same
name, major, and minor version numbers
but different revisions are intended
to be fully interchangeable. A higher
revision number might be used in a
build that fixes a security hole in a
previously released assembly.Subsequent versions of an assembly
that differ only by build or revision
numbers are considered to be Hotfix
updates of the prior version.
My question is concerning the meaning of the terms Build and Revision in this context.
It seems to me that in general parlance, we do "builds" when there are changes in the source. Thus "build 678" and "build 679" are different precisely because the sources are different in some way - typically as a result of a checkin of some changed source. It seems to me that the .NET definition uses "Revision" in the way one generally uses "build".
Does anybody USE the definition above in their versioning? If so can you give concrete examples of WHY you did?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
本节解释了其中的差异。当您的产品已经发货并且您需要在已经进行更新的同时对已发货版本进行修复时,将使用修订版。
例如 1.1.10.0 船舶。我正在对功能进行一些小更改,当我收到需要修复的安全警报时,我处于 1.1.20.0 状态。我无法将 1.1.10.0 增加到 1.1.11.0,因为它代表其他内容。所以我使用 1.1.10.1 来标识它是 1.1.10.0 代码的修订版。
希望这比泥浆更清晰一点。还要记住公司的规模以及他们发布的提出这些定义的软件项目的规模。
This section explains the difference. The Revision is used when your product has shipped and you need to make fixes to a shipped version while you are already progressing with updates.
For example 1.1.10.0 ships. I am making small changes to functionality and am at 1.1.20.0 when I get a security alert that needs fixing. I can't increment 1.1.10.0 to 1.1.11.0, as that represents something else. So I use 1.1.10.1 to identify it is a revision of the 1.1.10.0 code.
Hope this is a little clearer than mud. Also remember the size of the company and the size of the software projects they ship that came up with these definitions.
我完全同意你的观点。除非你对它们持保留态度,否则给出的描述没有多大意义。对我来说,最后一个版本号应该表示构建,即每次编译时更新的版本号。其他数字代表软件/API 的不同程度的更改。
实际上,这就是版本号的典型使用方式。 (当然,我如何使用它们。)
Major - 当软件的功能集/API 发生显着变化时增加
次要 - 当进行显着更改、次要 API 更改或添加新功能时增加
构建 - 进行较小更改时增加,通常是错误修复和改进(尽管没有 API 更改)
修订版 - 代表构建实例的唯一 ID/编号
I agree with you totally here. The given descriptions don't make a great deal of sense unless you interpret them with a pinch of salt. For me, the last of the version numbers should mean build, i.e. the number that gets updated on each compilation. The other numbers represent differing degrees of change to the software/API.
In practice, this is how the version numbers typically get used. (Certainly, how I use them.)
Major - increased when the feature set/API of the software changes significantly
Minor - increased when notable changes are made, minor API changes or addition of new functionality
Build - increased when minor changes are made, typically bug fixes and improvements (though no API changes)
Revision - a unique ID/number that represents the build instance