Hello,
I experienced the same issue as you do.
I came up with the following solution (Example:
https://1drv.ms/x/s!AiMl0SSQdgy9kUiiBfGFdsan-N9s )
You may have the following semantic version strings:
- 1.2.3-alpha.1+1
- 1.2.3-alpha.2+2
- 1.2.3-beta.1+3
- 1.2.3-beta.2+4
- 1.2.3-rc.1+5
- 1.2.3-rc.2+6
- 1.2.3+7
- 11.22.33+8
- 128.128.128-rc.1+9
- 255.255.654+10
Now I define number ranges with the pre-release stages:
Code: Select all
Stage Start End Number of possible versions
Alpha 1 40 40
Beta 41 80 40
RC 81 98 18
Stable 99 99 1
Now I compute the ProductVersion as follows:
The product version major is the semantic version major.
The product version minor is the semantic version minor.
The product version patch/revision is the semantic version patch/revision
multiplied by 100.
I extract the pre-release number (the "1" from "alpha.1"). Pre-releases without a number will get a "1".
Based on the pre-release stage, I add the pre-release number to the stage's start number. When this final number is computed, add this number to the product version patch/revision.
Semantic version
1.2.3-alpha.2+2 will be product version
1.2.302.2. For more example, please review the above mentioned shared Office 365 Excel document link.
However, you will not be able to semantically point out a product version as an pre-release. But you have the possibility to "map" semantic versioning into product version
somehow.
Edit: What just have come to my mind: You can check the product patch/revision. When the last 2 digits are not "99", then you have a pre-release version. This could be implemented into a custom action (e.g. showing a dialog box), if you like to "warn" the user about this version is a pre-release.
FOLLOW US
Get the latest news in Application Packaging