From 3f05b1edffd065b8ce0fd49bffee4b3bd0f2328a Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Fri, 15 May 2026 10:54:03 -0400 Subject: [PATCH 1/9] Improve 11.0 P4 coverage --- aspnetcore/blazor/tooling.md | 2 +- .../servers/yarp/distributed-tracing.md | 7 ++-- aspnetcore/release-notes/aspnetcore-11.md | 2 +- .../aspnetcore-11/includes/blazor.md | 41 +++++++++++++++---- 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/aspnetcore/blazor/tooling.md b/aspnetcore/blazor/tooling.md index 131dbc699bad..709454a89277 100644 --- a/aspnetcore/blazor/tooling.md +++ b/aspnetcore/blazor/tooling.md @@ -628,7 +628,7 @@ The `blazor-wasm-servicedefaults` project template creates a service defaults li The template features: -* [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet) support: Logging, metrics, and tracing with standard OTLP exporter. +* [OpenTelemetry (OTEL)](https://opentelemetry.io/) ([OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet)) support: Logging, metrics, and tracing with standard OTEL Protocol (OTLP) exporter. * Service discovery integration via the [`Microsoft.Extensions.ServiceDiscovery` NuGet package](https://www.nuget.org/packages/Microsoft.Extensions.ServiceDiscovery). * HTTP resilience using the standard resilience handler via the [`Microsoft.Extensions.Http.Resilience` NuGet package](https://www.nuget.org/packages/Microsoft.Extensions.Http.Resilience). diff --git a/aspnetcore/fundamentals/servers/yarp/distributed-tracing.md b/aspnetcore/fundamentals/servers/yarp/distributed-tracing.md index cd696feada28..68300c78bb05 100644 --- a/aspnetcore/fundamentals/servers/yarp/distributed-tracing.md +++ b/aspnetcore/fundamentals/servers/yarp/distributed-tracing.md @@ -9,16 +9,15 @@ ms.topic: concept-article content_well_notification: AI-contribution ai-usage: ai-assisted --- - # YARP Distributed tracing As an ASP.NET Core component, YARP can easily integrate into different tracing systems the same as any other ASP.NET Core application. .NET has built-in configurable support for distributed tracing that YARP takes advantage of to enable such scenarios out-of-the-box. -## Using Open Telemetry +## Using OpenTelemetry (OTEL) -YARP supports distributed tracing using Open Telemetry (OTEL). When a request comes in, and there is a listener for Activities, then ASP.NET Core will propagate the [Trace Context](https://www.w3.org/TR/trace-context) trace-id, or create one if necessary, and create new spans/activities for the work performed. +YARP supports distributed tracing using [OpenTelemetry (OTEL)](https://opentelemetry.io/). When a request comes in, and there is a listener for Activities, then ASP.NET Core will propagate the [Trace Context](https://www.w3.org/TR/trace-context) trace-id, or create one if necessary, and create new spans/activities for the work performed. In addition YARP can create activities for: * Forwarding Requests @@ -28,7 +27,7 @@ These will only be created if there is a listener for the [`ActivitySource`](/do ### Example: Application Insights -For example, to monitor the traces with Application Insights, the proxy application needs to use the [Open Telemetry](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry) and [Azure Monitor](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore) SDKs. +For example, to monitor the traces with Application Insights, the proxy application needs to use the [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry) and [Azure Monitor](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore) SDKs. `application.csproj`: diff --git a/aspnetcore/release-notes/aspnetcore-11.md b/aspnetcore/release-notes/aspnetcore-11.md index 671698e45f7b..cb734c66e5fe 100644 --- a/aspnetcore/release-notes/aspnetcore-11.md +++ b/aspnetcore/release-notes/aspnetcore-11.md @@ -5,7 +5,7 @@ author: wadepickett description: Learn about the new features in ASP.NET Core in .NET 11. ms.author: wpickett ms.custom: mvc -ms.date: 05/14/2026 +ms.date: 05/15/2026 uid: aspnetcore-11 --- # What's new in ASP.NET Core in .NET 11 diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index 61e6fb715ac4..9dd3565d84b7 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -123,13 +123,32 @@ For more information, see . +The standalone .NET Web Worker project template, which scaffolds a Web Worker client for offloading long-running work to a background thread in Blazor WebAssembly and Blazor Web apps (for client-side rendering, CSR), was renamed to the Blazor Web Worker project template (`blazorwebworker`) to make it clearer that it's part of the Blazor stack. Two often-requested capabilities have been added to the generated `WebWorkerClient`: + +* `InvokeVoidAsync` for fire-and-forget worker calls that don't return a value, mirroring the shape on `IJSRuntime`. +* Cancellation and timeout support on both worker creation and worker invocations, so callers can pass a `CancellationToken` and tear down a stuck worker cleanly. + +Existing projects created with the old template continue to work. The rename only affects the template name shown in `dotnet new list` and in Visual Studio's list of **Create a new project** templates. + +For more information, see the following resources: + +* +* [.NET Web Worker template update to Blazor Web Worker template (`dotnet/aspnetcore` #66070)](https://github.com/dotnet/aspnetcore/pull/66070) (Please don't comment on closed issues and PRs.) ### Virtualization enhancements -* The component no longer assumes every item has the same height. The component now adapts to measured item sizes at runtime, which reduces incorrect spacing and scrolling when item heights vary. These updates include an update to the default value of , which was `3` in .NET 10 or earlier and now changes to `15` in .NET 11 or later. The change in default value increases the precision of average item height calculations. +* The component no longer assumes every item has the same height. Previously, the component disabled the browser's native scroll anchoring (to avoid an infinite rendering loop), which meant any height change above the viewport—item expansion, data updates, lazy-loaded content—caused visible items to jump on screen. The `Virtualize` component now adapts to measured item sizes at runtime, which reduces incorrect spacing and scrolling when item heights vary. + + The updates use a hybrid approach: native CSS scroll anchoring on browsers that support it for non-`` layouts with a manual `ResizeObserver`-based scroll-compensation fallback for `
` layouts and Safari, where native anchoring miscalculates positions on `` elements. + + Apps using the `Virtualize` component receive the benefits of these updates automatically. No developer API changes are required. - For more information, see the [*Item size* section](xref:blazor/components/virtualization?view=aspnetcore-11.0#item-size) and [*Overscan count* section](xref:blazor/components/virtualization?view=aspnetcore-11.0#overscan-count) of the *Virtualization* article. + These updates include an update to the default value of , which was `3` in .NET 10 or earlier and now changes to `15` in .NET 11 or later. The change in default value increases the precision of average item height calculations. + + For more information, see the following resources: + + * [*Item size* section](xref:blazor/components/virtualization?view=aspnetcore-11.0#item-size) and [*Overscan count* section](xref:blazor/components/virtualization?view=aspnetcore-11.0#overscan-count) of the *Virtualization* article. + * [[Virtualization] Visible content does not shift when in-DOM items above the viewport change height (`dotnet/aspnetcore` #65951)](https://github.com/dotnet/aspnetcore/pull/65951) (Please don't comment on closed issues and PRs). * Use the new `AnchorMode` parameter to control how the viewport behaves at list edges when items are dynamically added: @@ -145,7 +164,10 @@ Blazor WebAssembly apps can perform heavy computing on the client, but doing so ``` - For more information, see . + For more information, see the following resources: + + * + * [[release/11.0-preview4] Virtualization AnchorMode with for variable-height support (`dotnet/aspnetcore` #66521)](https://github.com/dotnet/aspnetcore/pull/66521) (Please don't comment on closed issues and PRs.) ### New service defaults library project template for Blazor WebAssembly apps @@ -160,7 +182,7 @@ The `blazor-wasm-servicedefaults` project template creates a service defaults li `Microsoft.AspNetCore.Components.Gateway` is a lightweight ASP.NET Core host that replaces [`Microsoft.AspNetCore.Components.WebAssembly.DevServer`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.DevServer) for serving standalone Blazor WebAssembly applications during development and production. -For more information, see [[Blazor] Replace DevServer with BlazorGateway for standalone WASM apps (`dotnet/aspnetcore` #65982)](https://github.com/dotnet/aspnetcore/pull/65982). +For more information, see [[Blazor] Replace DevServer with BlazorGateway for standalone WASM apps (`dotnet/aspnetcore` #65982)](https://github.com/dotnet/aspnetcore/pull/65982) (Please don't comment on closed issues and PRs). ### Server-triggered circuit pause @@ -178,8 +200,11 @@ This feature is useful in the following scenarios: For more information and an implementation example for server restarts, see . - +Two trimming changes shrink published Blazor WebAssembly apps that don't use [OpenTelemetry (OTEL)](https://opentelemetry.io/) or Hot Reload: + +* The `ComponentsMetrics` and `ComponentsActivitySource` types are now gated behind a `[FeatureSwitchDefinition]` attribute, so the trimmer can drop the metrics and tracing call paths from `Renderer` and friends when `System.Diagnostics.Metrics.Meter.IsSupported` is `false` (the default for trimmed apps) [[browser][wasm] Implement IL trimming for OTEL (`dotnet/aspnetcore` #65901)](https://github.com/dotnet/aspnetcore/pull/65901) (Please don't comment on closed issues and PRs). +* `HotReloadManager` now exposes a feature-switched `IsSupported` property tied to `System.Reflection.Metadata.MetadataUpdater.IsSupported`, so the trimmer can eliminate hot-reload caches and metadata-update handler registrations across the renderer when published [[blazor][wasm] Fix hot reload IL trimming (`dotnet/aspnetcore` #65903)](https://github.com/dotnet/aspnetcore/pull/65903) (Please don't comment on closed issues and PRs). + +Apps that use OTEL or Hot Reload aren't affected by the preceding updates. From 35983f6172b3a99dc4dab0474f7b079067e53bef Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Fri, 15 May 2026 11:04:02 -0400 Subject: [PATCH 2/9] Update distributed-tracing.md --- aspnetcore/fundamentals/servers/yarp/distributed-tracing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/fundamentals/servers/yarp/distributed-tracing.md b/aspnetcore/fundamentals/servers/yarp/distributed-tracing.md index 68300c78bb05..10fa393324a8 100644 --- a/aspnetcore/fundamentals/servers/yarp/distributed-tracing.md +++ b/aspnetcore/fundamentals/servers/yarp/distributed-tracing.md @@ -4,7 +4,7 @@ title: YARP Distributed tracing description: YARP Distributed tracing author: tdykstra ms.author: tdykstra -ms.date: 04/24/2025 +ms.date: 05/15/2026 ms.topic: concept-article content_well_notification: AI-contribution ai-usage: ai-assisted From 4cb828ffc943906a60cd825ed53a462189a174cb Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Fri, 15 May 2026 11:47:09 -0400 Subject: [PATCH 3/9] Drop ".NET" from ".NET Aspire" --- aspnetcore/blazor/tooling.md | 2 +- aspnetcore/release-notes/aspnetcore-11/includes/blazor.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/tooling.md b/aspnetcore/blazor/tooling.md index 709454a89277..fcab24497cce 100644 --- a/aspnetcore/blazor/tooling.md +++ b/aspnetcore/blazor/tooling.md @@ -624,7 +624,7 @@ For more information on template options, see the following resources: ## Service defaults library for Blazor WebAssembly apps -The `blazor-wasm-servicedefaults` project template creates a service defaults library for Blazor WebAssembly apps with .NET Aspire integration. +The `blazor-wasm-servicedefaults` project template creates a service defaults library for Blazor WebAssembly apps with [Aspire](/dotnet/aspire/get-started/aspire-overview) integration. The template features: diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index 9dd3565d84b7..6e705b66261e 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -171,7 +171,7 @@ For more information, see the following resources: ### New service defaults library project template for Blazor WebAssembly apps -The `blazor-wasm-servicedefaults` project template creates a service defaults library for Blazor WebAssembly apps with .NET Aspire integration. For more information, see . +The `blazor-wasm-servicedefaults` project template creates a service defaults library for Blazor WebAssembly apps with [Aspire](/dotnet/aspire/get-started/aspire-overview) integration. For more information, see . ### New development server for Blazor WebAssembly apps From f6b4b866cf9274629298c7d51dcfa9334779399a Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Tue, 19 May 2026 06:14:53 -0400 Subject: [PATCH 4/9] Update the Blazor Web Worker template lead-in remarks --- aspnetcore/release-notes/aspnetcore-11/includes/blazor.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index 6e705b66261e..5e8f0214e8db 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -123,7 +123,9 @@ For more information, see Date: Tue, 19 May 2026 06:17:45 -0400 Subject: [PATCH 5/9] Update the date --- aspnetcore/release-notes/aspnetcore-11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/release-notes/aspnetcore-11.md b/aspnetcore/release-notes/aspnetcore-11.md index cb734c66e5fe..4800a84d2575 100644 --- a/aspnetcore/release-notes/aspnetcore-11.md +++ b/aspnetcore/release-notes/aspnetcore-11.md @@ -5,7 +5,7 @@ author: wadepickett description: Learn about the new features in ASP.NET Core in .NET 11. ms.author: wpickett ms.custom: mvc -ms.date: 05/15/2026 +ms.date: 05/19/2026 uid: aspnetcore-11 --- # What's new in ASP.NET Core in .NET 11 From d766d571bd27840f7220d546782bf02a364aa20b Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Tue, 19 May 2026 06:20:52 -0400 Subject: [PATCH 6/9] Further Blazor Web Worker template updates --- aspnetcore/release-notes/aspnetcore-11/includes/blazor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index 5e8f0214e8db..8b2e5bffdf25 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -123,7 +123,7 @@ For more information, see Date: Tue, 19 May 2026 06:40:45 -0400 Subject: [PATCH 7/9] Update the Blazor Web Workers article --- aspnetcore/blazor/blazor-with-dotnet-on-web-workers.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/aspnetcore/blazor/blazor-with-dotnet-on-web-workers.md b/aspnetcore/blazor/blazor-with-dotnet-on-web-workers.md index 4fb9f919303a..b80ca1a32050 100644 --- a/aspnetcore/blazor/blazor-with-dotnet-on-web-workers.md +++ b/aspnetcore/blazor/blazor-with-dotnet-on-web-workers.md @@ -17,14 +17,14 @@ uid: blazor/blazor-web-workers --> -Modern Blazor WebAssembly apps often handle CPU-intensive work alongside rich UI updates. Tasks such as image processing, document parsing, or data crunching can easily freeze the browser's main thread. Web Workers let you push that work to a background thread. Combined with the .NET WebAssembly runtime, you can keep writing C# while the UI stays responsive. +Modern Blazor WebAssembly apps often handle CPU-intensive work alongside rich UI updates. Tasks such as image processing, document parsing, or data crunching can easily freeze the browser's main thread. Web Workers let you push that work to a background thread. Combined with the .NET WebAssembly runtime, you can execute C# code in the background while the UI stays responsive. :::moniker range=">= aspnetcore-11.0" -The Blazor Web Worker project template (`dotnet new blazorwebworker`) provides built-in scaffolding for running .NET code in a Web Worker in a Blazor WebAssembly app. The template generates the required JavaScript worker scripts, a C# `WebWorkerClient` class, and a starter `WorkerMethods.cs` file, which removes the need to write the interop layer manually. To learn about Web Workers with React, see . +The Blazor Web Worker project template (`blazorwebworker`) contains a Web Worker client for Blazor WebAssembly apps. The template generates the required JavaScript worker scripts, a C# `WebWorkerClient` class, and a starter `WorkerMethods.cs` file, which removes the need to write the interop layer manually. To learn about Web Workers with React or other custom JavaScript frontends, see . > [!NOTE] -> In .NET 11 and later, the Blazor Web Worker template (`blazorwebworker`) is intended for Blazor WebAssembly scenarios. For React or other custom JavaScript frontends, use the manual approach in . +> Use of a Web Worker is primarily useful with Blazor WebAssembly apps to improve performance but can be implemented for the client-side project (`.Client`) of a Blazor Web App. Typically, a Blazor Web App performs demanding work server-side, where the server can handle the work faster than the client and the app avoids the small delay setting up a Web Worker. However, use of a Web Worker via the Blazor Web Worker template client-side in a Blazor Web App is supported. ## Create the projects @@ -224,6 +224,9 @@ public sealed class WebWorkerClient : IAsyncDisposable The guidance in this article mirrors the concepts from the React-focused *.NET on Web Workers* walkthrough, but adapts every step to a Blazor frontend. It highlights the same QR-code generation scenario implemented in this repository. To learn about Web Workers with React, see . +> [!NOTE] +> Use of a Web Worker is primarily useful with Blazor WebAssembly apps to improve performance but can be implemented for the client-side project (`.Client`) of a Blazor Web App. Typically, a Blazor Web App performs demanding work server-side, where the server can handle the work faster than the client and the app avoids the small delay setting up a Web Worker. However, use of a Web Worker client-side in a Blazor Web App is supported. + ## Sample app Explore a complete working implementation in the [Blazor samples GitHub repository](https://github.com/dotnet/blazor-samples). The sample is available for .NET 10 or later and named `DotNetOnWebWorkersBlazorWebAssembly`. From 7104225573a9e677702128e5a9d4e6ce7a6d75d1 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 20 May 2026 05:33:49 -0400 Subject: [PATCH 8/9] Update aspnetcore/release-notes/aspnetcore-11/includes/blazor.md Co-authored-by: Wade Pickett --- aspnetcore/release-notes/aspnetcore-11/includes/blazor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index 8b2e5bffdf25..7a4b09bcd0df 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -169,7 +169,7 @@ For more information, see the following resources: For more information, see the following resources: * - * [[release/11.0-preview4] Virtualization AnchorMode with for variable-height support (`dotnet/aspnetcore` #66521)](https://github.com/dotnet/aspnetcore/pull/66521) (Please don't comment on closed issues and PRs.) + * [[release/11.0-preview4] Virtualization AnchorMode with variable-height support (`dotnet/aspnetcore` #66521)](https://github.com/dotnet/aspnetcore/pull/66521) (Please don't comment on closed issues and PRs.) ### New service defaults library project template for Blazor WebAssembly apps From 173666a67a60f34a99bd43a3879303440af0f2a8 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 20 May 2026 05:39:09 -0400 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: Luke Latham <1622880+guardrex@users.noreply.github.com> --- aspnetcore/release-notes/aspnetcore-11/includes/blazor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index 7a4b09bcd0df..13c0603ada16 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -200,7 +200,7 @@ This feature is useful in the following scenarios: * Instance draining. * App maintenance windows. -For more information and an implementation example for server restarts, see . +For more information and an implementation example for server restarts, see . ### Smaller Blazor WebAssembly publish output