Repository navigation
Upgrade to .NET 11 - #2665
Merged
Merged
Upgrade to .NET 11#2665
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
niemyjski
reviewed
Oct 15, 2026
ejsmith
force-pushed
the
feature/net11-rc2
branch
from
October 15, 2026 02:02
521b460 to
00a3508
Compare
ejsmith
force-pushed
the
feature/net11-rc2
branch
from
November 2, 2026 21:12
00a3508 to
ed17b14
Compare
Target net11.0 with SDK 11.0.100 and runtime 11.0.0 across projects, CI, Docker images, and dev tooling, and move framework-aligned packages to 11.0.0. Microsoft.AspNetCore.OpenApi 11 requires Microsoft.OpenApi 3.x, so adapt the transformers to the media type interfaces and keep the published document on OpenAPI 3.1. Fix two advisories published with the November servicing release: move Aspire to 13.6.5 (GHSA-f7vh-h5g3-7jrh) and pin System.Formats.Cbor 11.0.0 over the 9.0.5 that AWSSDK.Extensions.CborProtocol pulls in (GHSA-vmv3-wvjp-wqpj). Refresh OpenTelemetry, ModelContextProtocol, Scalar, MailKit, and test packages. Drop the Microsoft.Extensions.Logging.Abstractions reference now that it ships in the shared framework, and disable static web assets in the test project so the Web and Job hot reload assets don't collide. Add an opt-in UseRuntimeAsync build property that compiles our async methods with .NET 11 runtime async. It stays off by default: A/B runs of the event pipeline and the event, stack, and ingestion endpoints showed no measurable change in time, CPU, or allocations.
ejsmith
force-pushed
the
feature/net11-rc2
branch
from
November 11, 2026 15:54
ed17b14 to
75b01b5
Compare
Microsoft.AspNetCore.OpenApi 11.0.0 depends on Microsoft.OpenApi [3.11.0, 4.0.0), so the explicit pin is redundant.
This was referenced Nov 11, 2026
Merged
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.
Upgrade the app to .NET 11 GA (SDK
11.0.100, runtime11.0.0, released 2026-11-10) and refresh the .NET dependencies that upgrade cleanly. All projects targetnet11.0.global.json, CI, the Dockerfile, the dev container, VS Code launch paths, the CI shard runner, and the email-template preview script all point at .NET 11. Public routes, persisted data, and config keys are unchanged.Also fixes two advisories published 2026-11-10 that fail restore on
maintoo:System.Formats.CborDoS (moderate), 9.0.5 viaAWSSDK.Extensions.CborProtocolSystem.Formats.Cbor11.0.0 in Insulation.NET 11.0.0 also includes the RC3 Brotli fix (CVE-2026-111497) that applies to the source-map
HttpClient.mainis still on 10.0.13; 10.0.15 has the fixes.Runtime async is wired up as an opt-in switch (
-p:UseRuntimeAsync=true) and is off. A/B benchmarks showed no measurable gain, and its known bugs are still open in GA.Validation: Debug and Release builds with warnings as errors, the full backend suite (3,561 tests: 3,534 passed, 27 skipped, 0 failed; the skips are the opt-in assistant evals and two perf tests), and a clean
dotnet list package --vulnerable --include-transitive.Packages, runtime async, review notes, and verification
Package updates
11.0.0[3.11.0, 4.0.0)). Two transformers now build the concreteOpenApiMediaType(upgrade guide).Not updated:
Runtime async (opt-in, off)
.NET 11 can compile
asyncmethods as runtime async methods: the runtime suspends and resumes them instead of compiler-generated state machines. In GA it is still a preview compiler feature, enabled with<Features>runtime-async=on</Features>.src/Directory.Build.propsmaps-p:UseRuntimeAsync=trueto that.The .NET libraries (Kestrel, MVC, routing,
HttpClient) already ship compiled this way. Foundatio, the Elasticsearch client, and StackExchange.Redis use state machines regardless. The switch therefore only changes our own assemblies.A/B results (RC3, Release, alternating processes against the test Elasticsearch, warmup excluded):
POST /api/v2/events, 120 × 20 eventsEventPostsJobdrain, 2,400 eventsGET /api/v2/events, 400 requestsGET /api/v2/stacks, 400 requestsNothing is significant. Each request allocates 1 to 2 MB, mostly in Elasticsearch I/O and JSON, so removing our state machines doesn't register. These issues are still open in GA:
ref structlocals that trigger it.AsyncLocalvalues leak intocatch … whenfilters. It is milestoned for .NET 12.Review notes
swagger-typescript-api. The regeneratedopenapi.jsonis semantically unchanged apart from the version and the server URL's trailing slash._framework/Microsoft.NET.Sdk.BlazorWeb.*hot-reload assets. The test project references both Web and Job, so its Debug build fails on the duplicates. It now setsStaticWebAssetsEnabled=false; the tests servewwwrootfrom the Web content root. GA still needs this.CloseInactiveSessionsJobTestsnow compares at the stored double precision.IHost.RunAsyncnow throws when aBackgroundServicefails.Program.Mainthen logs Fatal and exits with 1.error.type, andActivity.StatusDescriptionis no longer set.Content-Length/Transfer-Encodingheaders and HTTP/2 connection headers.sdk:11.0.100andaspnet:11.0.0images are Ubuntu 26.04, run as root, and listen on 8080. .NET 11 requires x86-64-v2.Verification