|
39 | 39 | <UseIntellisenseDocumentationFile Condition="'$(UseIntellisenseDocumentationFile)' == '' and Exists('$(LibIntellisenseDocumentationFilePath)')">true</UseIntellisenseDocumentationFile>
|
40 | 40 | </PropertyGroup>
|
41 | 41 |
|
42 |
| - <PropertyGroup Condition="'$(ServicingVersion)' != ''"> |
| 42 | + <PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing'"> |
| 43 | + <!-- If no servicing version is set we need to default to 0 in order for dependency versions to |
| 44 | + be calculated propertly, if we don't set it to 0, we would get the dependency version using the |
| 45 | + product Patch Version --> |
| 46 | + <ServicingVersion Condition="'$(ServicingVersion)' == ''">0</ServicingVersion> |
| 47 | + |
43 | 48 | <!-- Always update the package version in servicing. -->
|
44 |
| - <VersionPrefix>$(MajorVersion).$(MinorVersion).$(ServicingVersion)</VersionPrefix> |
| 49 | + <Version>$(MajorVersion).$(MinorVersion).$(ServicingVersion)</Version> |
| 50 | + <Version Condition="'$(VersionSuffix)' != ''">$(Version)-$(VersionSuffix)</Version> |
45 | 51 | <_IsWindowsDesktopApp Condition="$(WindowsDesktopCoreAppLibrary.Contains('$(AssemblyName);'))">true</_IsWindowsDesktopApp>
|
46 | 52 | <_IsAspNetCoreApp Condition="$(AspNetCoreAppLibrary.Contains('$(AssemblyName);'))">true</_IsAspNetCoreApp>
|
47 | 53 | <_AssemblyInTargetingPack Condition="('$(IsNETCoreAppSrc)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETFramework'">true</_AssemblyInTargetingPack>
|
|
267 | 273 | </Target>
|
268 | 274 |
|
269 | 275 | <Target Name="ValidateAssemblyVersionsInRefPack"
|
270 |
| - Condition="$(_AssemblyInTargetingPack) == 'true' and '$(PreReleaseVersionLabel)' == 'servicing'" |
| 276 | + Condition="'$(SkipValidateAssemblyVersion)' != 'true' and '$(_AssemblyInTargetingPack)' == 'true' and '$(PreReleaseVersionLabel)' == 'servicing'" |
271 | 277 | AfterTargets="CoreCompile" >
|
272 | 278 | <Error Condition="'$(AssemblyVersion)' != '$(LastReleasedStableAssemblyVersion)'" Text="AssemblyVersion should match last released assembly version $(LastReleasedStableAssemblyVersion)" />
|
273 | 279 | </Target>
|
274 | 280 |
|
| 281 | + <Target Name="ValidateServicingVersionIsPropertlySet" |
| 282 | + Condition="'$(PreReleaseVersionLabel)' == 'servicing'" |
| 283 | + AfterTargets="GenerateNuspec"> |
| 284 | + <Error Condition="'$(ServicingVersion)' == '0'" Text="ServicingVersion is set to 0 and it should be an increment of the patch version from the last released package." /> |
| 285 | + </Target> |
| 286 | + |
275 | 287 | </Project>
|
0 commit comments