Repository navigation
Migrate toolchain from net10.0 to net11.0 - #4163
Merged
Merged
Conversation
The `<TargetFramework>` is centralized into `Directory.Build.props` so the 60 individual project pins disappear. `global.json` pins the SDK at `11.0.100-preview.7.26381.103` with `allowPrerelease: true`. Container base images, `dotnet-install.sh` channels in the five Lambda/API Dockerfiles, and `build/Targets.fs` follow the same bump. `dotnet-tools.json` gains `rollForward: true` for the five tools that were pinned to `rollForward: false`, so they survive on a runner that ships only a .NET 11 runtime. `Microsoft.Extensions.DependencyInjection.Abstractions` is removed from the explicit references in `Elastic.Documentation.Search` — it became an inbox assembly on .NET 11 and NuGet raises `NU1510` when it appears explicitly. The test runner stack needs a coordinated upgrade: `xunit.v3` moves to `3.2.2`, `Microsoft.Testing.Platform` and `Microsoft.Testing.Platform.MSBuild` to `2.3.3`, and `Microsoft.Testing.Extensions.Telemetry` and `Microsoft.Testing.Extensions.TrxReport.Abstractions` are pinned to `2.3.3` as new explicit transitive pins. `MTP.MSBuild 2.x` blocks the VSTest path on SDK 10+ via `_MTPBeforeVSTest`; a new `Directory.Build.targets` overrides `IsTestingPlatformApplication` to `false` after all package targets have run, so `xunit.runner.visualstudio` handles discovery and execution instead. New .NET 11 analyzer diagnostics in production code are fixed where they appear: `CA2016` (`CancellationToken` not forwarded in four `WriteLineAsync` calls), `CA1860` (`Any()` replaced with `Count > 0` in two sites), and `IDE0301` (`FrozenDictionary<K,V>.Empty` replaced with `[]` in five files). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Resolved conflicts: - `FetchedReleaseNotes.cs`: kept the new `NotFoundDeclaredProducts` property from main; kept the `[]` initialization from our branch. - `Elastic.Documentation.Api/Dockerfile`: took main's combined `RUN` layer (tar + findutils + dotnet-install in one step) and kept our `--channel 11.0` flag so .NET 11 is installed instead of the LTS default. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4163/ Sample changed pages: |
Contributor
There was a problem hiding this comment.
Approved.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
akira28
approved these changes
Sep 25, 2026
akira28
reviewed
Oct 1, 2026
| { | ||
| "sdk": { | ||
| "version": "10.0.100", | ||
| "version": "11.0.100-preview.7.26381.103", |
Contributor
There was a problem hiding this comment.
Suggested change
| "version": "11.0.100-preview.7.26381.103", | |
| "version": "11.0.100-rc.1.26425.128", |
Contributor
There was a problem hiding this comment.
apparently is supported for production, we can actually think to merge this
Contributor
|
I guess we should wait for the GA release November 10, 2026 |
Pin 11.0.100-rc.3.26522.148, take main's TUnit/MTP test stack (drops the xunit workarounds and Directory.Build.targets), drop the TFM from the new Elastic.Authoring.Tests project, fix an F# nullness error in build/Targets.fs, and default Swagger 2.0 specs with a host but no schemes to https because Microsoft.OpenApi's UriBuilder.Host = "//host" is rejected by .NET 11. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Treat an empty Swagger 2.0 schemes array like a missing one, with JSON and YAML regression cases. Point README, CONTRIBUTING and the essc base image note at .NET 11. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Take main's mise setup and its Lambda Dockerfiles, which install the SDK from global.json and so follow the rc.3 pin. Drop the two project files main deleted, and move the new shared testing project to the shared net11.0. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
.NET 11 is released, so global.json drops the rc.3 pin and allowPrerelease. The two projects main added since the last merge lose their own net10.0, and docs-journeys forwards its cancellation token (CA2016). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The whole toolchain moves from
net10.0tonet11.0, pinned to the .NET 11 GA SDK11.0.100. One shared<TargetFramework>replaces 60 per-project lines, and the container and Lambda images follow. .NET 11 was released at .NET Conf 2026.Affects: API reference, Internals
Prompt summary: Migrate docs-builder to .NET 11, starting with the mechanics: centralize the TFM into
Directory.Build.props, updateglobal.jsonto the installed .NET 11 SDK, fix container images and Dockerfile install channels, update dotnet tools rollforward policy, and clear any new analyzer errors the upgrade surfaces in production code.Why
Each project file pins
<TargetFramework>net10.0</TargetFramework>itself, so a framework bump touches every file and can drift. Five dotnet tools setrollForward: false, so they fail to start on a runner that has only a .NET 11 runtime.What
One shared target framework
Directory.Build.propssetsnet11.0for every project, and the per-project<TargetFramework>lines are gone, including the one in the newElastic.Authoring.Tests.global.jsonpins SDK11.0.100withrollForward: latestFeature; main'stest.runnersetting for Microsoft.Testing.Platform stays. The test stack is main's TUnit setup, so this PR adds no test-runner workarounds.Container and Lambda images
build/Targets.fspublishes the containers on11.0-noble-chiseled, andbuild/dev/Dockerfileuses the11.0SDK andruntime-depsimages. The Lambda and API Dockerfiles keep main's--jsonfile global.jsoninstall, so they follow the pin and need no change here.Tool rollforward and analyzer fixes
The five tools in
dotnet-tools.jsonthat hadrollForward: falsenow roll forward. .NET 11 adds analyzer diagnostics thatTreatWarningsAsErrorsturns into errors; the fixes are small. They forward the cancellation token (CA2016), useCount > 0overAny()(CA1860) and use[]overFrozenDictionary<K,V>.Empty(IDE0301). TheNU1510reference toMicrosoft.Extensions.DependencyInjection.Abstractionsis gone because the package is now inbox. An F# nullness error inbuild/Targets.fsis fixed too.Swagger 2.0 specs without
schemesMicrosoft.OpenApi 3.11.0 sets
UriBuilder.Host = "//host"for a Swagger 2.0 spec that has ahostbut noschemes. .NET 11 rejects that value with anArgumentException, so such specs stop loading.OpenApiReadernow addsschemes: ["https"]in that case before it parses. On .NET 10 these specs got afile://host/server URL, so the rendered server URL changes tohttps://host/.Out of scope: an upstream fix in Microsoft.OpenApi. The reader workaround can go once a release handles .NET 11.
Verify