Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is System.Version in .NET defined as Major.Minor.Build.Revision?

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?

like image 535
Jake Petroules Avatar asked Jun 23 '10 00:06

Jake Petroules


People also ask

What is Major Minor build revision?

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.

What is major version and minor version?

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.

What is .NET versioning?

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.

What is net revision?

. 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.


1 Answers

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.

like image 110
Nick Craver Avatar answered Oct 06 '22 08:10

Nick Craver