gpt4 book ai didi

c# - .Net AssemblyName.version 构建与修订

转载 作者:IT王子 更新时间:2023-10-29 04:16:59 24 4
gpt4 key购买 nike

MSDN 文档指出:

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.

我的问题是关于术语“构建”和“修订”在这种情况下的含义

在我看来,一般来说,当源代码发生变化时,我们会进行“构建”。因此,“build 678”和“build 679”恰好是不同的,因为源在某些方面不同——通常是由于 checkin 了一些更改的源。在我看来,.NET 定义使用“修订”的方式与通常使用“构建”的方式相同。

有人在他们的版本控制中使用上面的定义吗?如果是这样,你能举出具体的例子说明你为什么这么做吗?

最佳答案

Subsequent versions of an assembly that differ only by build or revision numbers are considered to be Hotfix updates of the prior version.

本节解释差异。当您的产品已发货并且您需要在已经进行更新的同时修复已发货的版本时使用修订版。

例如 1.1.10.0 发布。当我收到需要修复的安全警报时,我正在对功能进行小的更改并且在 1.1.20.0。我不能将 1.1.10.0 增加到 1.1.11.0,因为它代表其他东西。所以我使用 1.1.10.1 来识别它是对 1.1.10.0 代码的修订。

希望这比泥浆更清楚一点。还要记住公司的规模以及他们提出这些定义的软件项目的规模。

关于c# - .Net AssemblyName.version 构建与修订,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3279235/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com