Skip to content

Commit 824bdd2

Browse files
[release/9.0-staging] Switch to non-incremental servicing (#109316)
* Change pre-release version label to servicing. Bump patch version to 1. * Switch to non-incremental servicing. - Remove incremental servicing docs. - Update APICompat baseline. - Remove some mentions of package servicing process. - Remove redundant source build setting of GeneratePackageOnBuild. * Change the S.D.DS. ProjectReference to `src` instead of `ref` in M.E.L.C. * Update the template message * Update backport.yml message * Update library-servicing.md --------- Co-authored-by: Eric StJohn <[email protected]>
1 parent 29eae42 commit 824bdd2

File tree

11 files changed

+18
-2214
lines changed

11 files changed

+18
-2214
lines changed

.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ main PR <!-- Link to PR if any that fixed this in the main branch. -->
2222

2323
<!-- Please assess the risk of taking this fix. Provide details backing up your assessment. -->
2424

25-
# Package authoring signed off?
25+
# Package authoring no longer needed in .NET 9
2626

27-
IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary [package authoring](../../docs/project/library-servicing.md) and gotten it explicitly reviewed.
27+
IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
28+
Keep in mind that we still need package authoring in .NET 8 and older versions.

.github/workflows/backport.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,7 @@ jobs:
4848
4949
- The PR target branch is `release/X.0-staging`, not `release/X.0`.
5050
51-
- If the change touches code that ships in a NuGet package, you have added the necessary [package authoring](https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md) and gotten it explicitly reviewed.
51+
## Package authoring no longer needed in .NET 9
52+
53+
**IMPORTANT**: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
54+
Keep in mind that we still need package authoring in .NET 8 and older versions.

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
<NetFrameworkCurrent Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
123123

124124
<!-- Important: Set this to the GA version (or a close approximation) during servicing and adjust the TFM property below. -->
125-
<ApiCompatNetCoreAppBaselineVersion>8.0.0</ApiCompatNetCoreAppBaselineVersion>
126-
<ApiCompatNetCoreAppBaselineTFM>net8.0</ApiCompatNetCoreAppBaselineTFM>
125+
<ApiCompatNetCoreAppBaselineVersion>9.0.0-rtm.24516.5</ApiCompatNetCoreAppBaselineVersion>
126+
<ApiCompatNetCoreAppBaselineTFM>net9.0</ApiCompatNetCoreAppBaselineTFM>
127127
</PropertyGroup>
128128

129129
<PropertyGroup Label="CalculateConfiguration">

docs/project/library-servicing.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,12 @@ Servicing branches represent shipped versions of .NET, and their name is in the
88
- `release/7.0-staging`
99
- `release/6.0-staging`
1010

11-
## Check if a package is generated
12-
13-
If a library is packable (check for the `<IsPackable>true</IsPackable>` property) you'll need to set `<GeneratePackageOnBuild>true</GeneratePackageOnBuild>` in the source project. That is necessary as packages aren't generated by default in servicing releases.
14-
15-
## Determine ServiceVersion
16-
17-
When you make a change to a library & ship it during the servicing release, the `ServicingVersion` must be bumped. This property is found in the library's source project. It's also possible that the property is not in that file, in which case you'll need to add it to the library's source project and set it to 1. If the property is already present in your library's source project, just increment the servicing version by 1.
11+
IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
12+
Keep in mind that we still need package authoring in .NET 8 and older versions.
1813

1914
## Test your changes
2015

21-
All that's left is to ensure that your changes have worked as expected. To do so, execute the following steps:
16+
Develop and test your change as normal. For packages, you may want to test them outside the repo infrastructure. To do so, execute the following steps:
2217

2318
1. From a clean copy of your branch, run `build.cmd/sh libs -allconfigurations`
2419

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<Project>
22
<PropertyGroup>
33
<!-- The .NET product branding version -->
4-
<ProductVersion>9.0.0</ProductVersion>
4+
<ProductVersion>9.0.1</ProductVersion>
55
<!-- File version numbers -->
66
<MajorVersion>9</MajorVersion>
77
<MinorVersion>0</MinorVersion>
8-
<PatchVersion>0</PatchVersion>
8+
<PatchVersion>1</PatchVersion>
99
<SdkBandVersion>9.0.100</SdkBandVersion>
1010
<PackageVersionNet8>8.0.11</PackageVersionNet8>
1111
<PackageVersionNet7>7.0.20</PackageVersionNet7>
1212
<PackageVersionNet6>6.0.36</PackageVersionNet6>
13-
<PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
13+
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
1414
<PreReleaseVersionIteration>
1515
</PreReleaseVersionIteration>
1616
<!-- Enable to remove prerelease label. -->

eng/packaging.targets

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
<PackageReadmeFilePath Condition="'$(PackageReadmeFilePath)' == '' and '$(EnableDefaultPackageReadmeFile)' == 'true'">PACKAGE.md</PackageReadmeFilePath>
2828
<BeforePack>$(BeforePack);ValidatePackageReadmeExists</BeforePack>
2929

30-
<!-- Non-shipping packages shouldn't incrementally serviced. -->
31-
<PackageUseIncrementalServicingVersion Condition="'$(IsShipping)' != 'true'">false</PackageUseIncrementalServicingVersion>
3230
<!-- Generate packages for rid specific projects or for allconfigurations during build. -->
3331
<!-- A package isn't generated if in servicing or in runtimelab. Intended to be overridden at project level. -->
3432
<IsRIDSpecificProject Condition="$(MSBuildProjectName.StartsWith('runtime.')) and
@@ -37,15 +35,7 @@
3735
'$(BuildAllConfigurations)' == 'true' or
3836
'$(IsRIDSpecificProject)' == 'true'
3937
) and
40-
(
41-
'$(PreReleaseVersionLabel)' != 'servicing' or
42-
'$(PackageUseIncrementalServicingVersion)' != 'true'
43-
) and
4438
'$(GitHubRepositoryName)' != 'runtimelab'">true</GeneratePackageOnBuild>
45-
<!-- When in source-build we need to generate all packages when building for all configurations even in servicing. -->
46-
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' != 'true' and
47-
'$(BuildAllConfigurations)' == 'true' and
48-
'$(DotNetBuildSourceOnly)' == 'true'">true</GeneratePackageOnBuild>
4939

5040
<!-- During NoBuild pack invocations, skip project reference build. Necessary for the IncludeProjectReferencesWithPackAttributeInPackage target. -->
5141
<BuildProjectReferences Condition="'$(NoBuild)' == 'true'">false</BuildProjectReferences>
@@ -58,18 +48,6 @@
5848
<NoWarn>$(NoWarn);CP0003</NoWarn>
5949
</PropertyGroup>
6050

61-
<PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing' and
62-
'$(PackageUseIncrementalServicingVersion)' == 'true'">
63-
<!-- If no servicing version is set we need to default to 0 in order for dependency versions to
64-
be calculated properly, if we don't set it to 0, we would get the dependency version using the
65-
product Patch Version -->
66-
<ServicingVersion Condition="'$(ServicingVersion)' == ''">0</ServicingVersion>
67-
68-
<!-- Always update the package version in servicing. -->
69-
<Version>$(MajorVersion).$(MinorVersion).$(ServicingVersion)</Version>
70-
<Version Condition="'$(VersionSuffix)' != ''">$(Version)-$(VersionSuffix)</Version>
71-
</PropertyGroup>
72-
7351
<!-- Main packages intentionally don't include assets for net6.0 and net7.0 anymore. -->
7452
<ItemGroup>
7553
<PackageValidationBaselineFrameworkToIgnore Include="net6.0" />
@@ -325,14 +303,6 @@
325303
</ItemGroup>
326304
</Target>
327305

328-
<Target Name="ValidateServicingVersionIsProperlySet"
329-
Condition="'$(PreReleaseVersionLabel)' == 'servicing' and
330-
'$(PackageUseIncrementalServicingVersion)' == 'true' and
331-
'$(DotNetBuildSourceOnly)' != 'true'"
332-
AfterTargets="GenerateNuspec">
333-
<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." />
334-
</Target>
335-
336306
<Target Name="ValidatePackageReadmeExists"
337307
Condition="'$(PackageReadmeFilePath)' != '' and
338308
!Exists('$(PackageReadmeFilePath)')">

src/libraries/Directory.Build.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
<!-- We can't generate an apphost without restoring the targeting pack. -->
3636
<UseAppHost>false</UseAppHost>
3737
<EnableDefaultItems>false</EnableDefaultItems>
38-
<!-- Libraries packages use the incremental servicing infrastructure. -->
39-
<PackageUseIncrementalServicingVersion>true</PackageUseIncrementalServicingVersion>
4038
</PropertyGroup>
4139

4240
<!-- Language configuration -->

src/libraries/Directory.Build.targets

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@
7272

7373
<!-- The assembly version gets updated during servicing when the assembly isn't part of a targeting pack. -->
7474
<PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing' and
75-
'$(IsPackable)' == 'true' and
76-
'$(PackageUseIncrementalServicingVersion)' == 'true'">
75+
'$(IsPackable)' == 'true'">
7776
<_IsWindowsDesktopApp Condition="$(WindowsDesktopCoreAppLibrary.Contains('$(AssemblyName);'))">true</_IsWindowsDesktopApp>
7877
<_IsAspNetCoreApp Condition="$(AspNetCoreAppLibrary.Contains('$(AssemblyName);'))">true</_IsAspNetCoreApp>
7978
<_AssemblyInTargetingPack Condition="('$(IsNETCoreAppSrc)' == 'true' or '$(IsNetCoreAppRef)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETFramework'">true</_AssemblyInTargetingPack>
80-
<AssemblyVersion Condition="'$(_AssemblyInTargetingPack)' != 'true'">$(MajorVersion).$(MinorVersion).0.$(ServicingVersion)</AssemblyVersion>
79+
<AssemblyVersion Condition="'$(_AssemblyInTargetingPack)' != 'true'">$(MajorVersion).$(MinorVersion).0.$(PatchVersion)</AssemblyVersion>
8180
</PropertyGroup>
8281

8382
<Import Project="$(RepositoryEngineeringDir)versioning.targets" />

src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/Microsoft.Extensions.Logging.Console.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<ItemGroup>
1111
<Compile Include="$(CoreLibSharedDir)System\Runtime\CompilerServices\IsExternalInit.cs" Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
1212
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Console\src\Microsoft.Extensions.Logging.Console.csproj" SkipUseReferenceAssembly="true" />
13-
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.DiagnosticSource\ref\System.Diagnostics.DiagnosticSource.csproj" />
13+
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.DiagnosticSource\src\System.Diagnostics.DiagnosticSource.csproj" />
1414
</ItemGroup>
1515
</Project>

src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)