Why is System.Version in .NET defined as Major.Minor.Build.Revision? Almost everyone (including me) seems to agree that revision belongs in third place, and "build" or whatever you'd like to call it belongs last.
Does Microsoft even use the numbers in this haphazard way, e.g. 3.5.3858.2, or are the names themselves just backwards? For example if you were to write your own Version class with the order Major.Minor.Build.Revision, would it be proper to swap the last two components when converting to a System.Version, or do you ignore it and just pretend the names are backwards?
This “MAJOR. minor. revision-build” is the way PKP uses to name a version and is a variant of something called “Semantic versioning”. To make it clear, let's take some real examples and see how they look like: Version tag.
Minor is some change that adds new functionality but doesn't change the program in any major way. Major is a change in the program that either breaks old functionality or is so big that it somehow changes how users should use the program.
Semantic versioning (SemVer for short) is a naming convention applied to versions of your library to signify specific milestone events. Ideally, the version information you give your library should help developers determine the compatibility with their projects that make use of older versions of that same library.
. NET Revision Tool is a small developer's tool that prints out the current Git or SVN revision info of a working directory. It can automatically write that revision information into your application's code so that it's compiled right into it.
I think the confusion comes what most consider a "revision" and what Microsoft does:
Build: A difference in build number represents a recompilation of the same source. This would be appropriate because of 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. This would be appropriate to fix a security hole in a previously released assembly.
The security fix angle, probably much more common for them, seems to be a decent reason to have it in last place, as the "most-minor" change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With