|
3 | 3 | <PropertyGroup> |
4 | 4 | <MdsVersionDefault>7.0.0</MdsVersionDefault> |
5 | 5 |
|
6 | | - <!-- |
7 | | - This is the version that is used as the version for the NuGet package. If it is not |
8 | | - overridden, the above default version will be used with the build number and a string suffix |
9 | | - appended (to indicate the version is pre-production). |
10 | | -
|
11 | | - NOTE/@TODO: Since the PackMds target in build2.proj directly calls nuget.exe, it will not |
12 | | - pick up this property. |
13 | | - --> |
14 | | - <MdsPackageVersion Condition="'$(MdsPackageVersion)' == ''">$(MdsVersionDefault).$(BuildNumber)-dev</MdsPackageVersion> |
| 6 | + <BuildNumber Condition="'$(BuildNumber)' == ''">0</BuildNumber> |
15 | 7 |
|
16 | 8 | <!-- |
17 | 9 | This is the version that is used as the AssemblyVersion and FileVersion fields in the |
|
20 | 12 | As a convenience feature, if a package version but not an assembly version is supplied, the |
21 | 13 | package version will have any suffix trimmed to generate valid assembly version. |
22 | 14 |
|
23 | | - NOTE: It is possible that the build number can be in the format xxxx.y which *may* overflow |
| 15 | + NOTE: It is possible that the build number can be in the format xxxxx.yy which *may* overflow |
24 | 16 | the 16-bit integer for the revision part of the assembly version. For that reason, we simply |
25 | 17 | discard everything after the first part of the build number for the assembly version. |
26 | 18 | --> |
27 | 19 | <MdsAssemblyVersion Condition="'$(MdsAssemblyVersion)' == '' AND '$(MdsPackageVersion)' == ''">$(MdsVersionDefault).$(BuildNumber.Split('.')[0])</MdsAssemblyVersion> |
28 | 20 | <MdsAssemblyVersion Condition="'$(MdsAssemblyVersion)' == '' AND '$(MdsPackageVersion)' != ''">$(MdsPackageVersion.Split('-')[0])</MdsAssemblyVersion> |
| 21 | + |
| 22 | + <!-- |
| 23 | + This is the version that is used as the version for the NuGet package. If it is not |
| 24 | + overridden, the above default version will be used with the build number and a string suffix |
| 25 | + appended (to indicate the version is pre-production). |
| 26 | +
|
| 27 | + NOTE: NuGet versioning can handle arbitrary version strings, so we do not need to trim the |
| 28 | + build number like we do for the assembly version. |
| 29 | +
|
| 30 | + NOTE/@TODO: Since the PackMds target in build2.proj directly calls nuget.exe, it will not |
| 31 | + pick up this property. |
| 32 | + --> |
| 33 | + <MdsPackageVersion Condition="'$(MdsPackageVersion)' == ''">$(MdsVersionDefault).$(BuildNumber)-dev</MdsPackageVersion> |
29 | 34 | </PropertyGroup> |
30 | 35 | </Project> |
0 commit comments