Lets say we are Releasing a .net library for first time. We want to go through a Beta + Release Candidate phase to get feedback from early adopters.
So in the context of SemVer we would initially be releasing Version 1.0.0-Beta1
. With increasing betas and release candidates after that.
For the sake of argument let say our current version number is 0.3.0
So from the SemVer we need to derive what to place in the various .net version placeholders. Those being:
Used to name the nuget package and also used by nuget to sort the package and derive if it is a pre-release
Remember assemblies may be strong named and binding redirects may complicate moving between betas when assembly version changes
Which maps to "File version" in the file properties dialog
Which maps to "Product version" in the file properties dialog
I don't think SemVer aims to resolve all 4 items you listed, but the very first one. It gives end users a way to understand whether they are using the latest, and on which build type (stable, beta, alpha, and so on). It cannot apply to most version number scenarios, as those scenarios require 4 segments with pure numbers.
Thus, for my own NuGet packages, I follow SemVer to set NuGet package version, but stick to AssemblyInfo Task when I compile the binaries.
Well, that's just how I handle the version numbers and others might have their styles.
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