From ba513097b4ad2d3da43bd3912e10c170d0186850 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Fri, 5 Dec 2025 07:31:08 -0500 Subject: [PATCH 01/12] [11.0 P1] Blazor release notes --- .../aspnetcore-11/includes/blazor.md | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index 41a6e5682a8e..03f962c5f848 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -1 +1,64 @@ -*Release notes appear in this section as preview features become available.* +### New `DisplayName` component and support for `[Display]` and `[DisplayName]` attributes + +The component can be used to display property names from metadata attributes: + +```csharp +[Required, DisplayName("Production Date")] +public DateTime ProductionDate { get; set; } +``` + +The [`[Display]` attribute](xref:System.ComponentModel.DataAnnotations.DisplayAttribute) on the model class property is supported: + +```csharp +[Required, Display(Name = "Production Date")] +public DateTime ProductionDate { get; set; } +``` + +Between the two approaches, the `[Display]` attribute is recommended, which makes additional properties available. The `[Display]` attribute also enables assigning a resource type for localization. When both attributes are present, `[Display]` takes precedence over `[DisplayName]`. If neither attribute is present, the component falls back to the property name. + +Use the `DisplayName` component in labels or table headers: + +```razor + +``` + +### Blazor script () startup options format now used for Blazor Server and Blazor WebAssembly scripts + +The Blazor Web App script (`blazor.web.js`) options object passed to `Blazor.start()` uses the following format since the release of .NET 8: + +```javascript +Blazor.start({ + ssr: { ... }, + circuit: { ... }, + webAssembly: { ... }, +}); +``` + +Now, Blazor Server (`blazor.server.js`) and Blazor WebAssembly (`blazor.webassembly.js`) scripts can use the same options format. + +The following example shows the prior options format, which remains supported: + +```javascript +Blazor.start({ + loadBootResource: function (...) { + ... + }, + }); +``` + +The newly supported options format for the preceding example: + +```javascript +Blazor.start({ + webAssembly: { + loadBootResource: function (...) { + ... + }, + }, +}); +``` + +For more information, see . From 1681f1afc946e38d906e7181a55c1c459505475f Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Fri, 5 Dec 2025 07:39:47 -0500 Subject: [PATCH 02/12] 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 03f962c5f848..b9115de886db 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -25,7 +25,7 @@ Use the `DisplayName` component in labels or table headers: ``` -### Blazor script () startup options format now used for Blazor Server and Blazor WebAssembly scripts +### Blazor Web script startup options format now supported for Blazor Server and Blazor WebAssembly scripts The Blazor Web App script (`blazor.web.js`) options object passed to `Blazor.start()` uses the following format since the release of .NET 8: From 6a7fa2090b5e565b4b03071c530f65271c6a3264 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Fri, 5 Dec 2025 07:41:48 -0500 Subject: [PATCH 03/12] Updates --- aspnetcore/release-notes/aspnetcore-11/includes/blazor.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index b9115de886db..b3a80b808a14 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -1,6 +1,10 @@ ### New `DisplayName` component and support for `[Display]` and `[DisplayName]` attributes -The component can be used to display property names from metadata attributes: + +The `DisplayName` component can be used to display property names from metadata attributes: ```csharp [Required, DisplayName("Production Date")] From f4209b39c4df0cf240a48eaa2e145f3591867bb4 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Wed, 7 Jan 2026 06:15:26 -0500 Subject: [PATCH 04/12] Add BasePath component coverage --- aspnetcore/release-notes/aspnetcore-11/includes/blazor.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md index b3a80b808a14..8c01f638aebe 100644 --- a/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-11/includes/blazor.md @@ -66,3 +66,7 @@ Blazor.start({ ``` For more information, see . + +### New `BasePath` component + +Blazor Web Apps can use the new `BasePath` component (``) to render the app's app base path (``) HTML tag automatically. For more information, see . From 18c8f5bd6daeaf3571d33d48a587d7fab7b3d44e Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Mon, 26 Jan 2026 08:31:12 -0500 Subject: [PATCH 05/12] Inline JS removal and add Migration guidance --- .../includes/net-prereqs-vs-11-latest.md | 3 + aspnetcore/includes/net-prereqs-vsc-11.0.md | 5 ++ aspnetcore/migration/100-to-110.md | 78 +++++++++++++++++++ aspnetcore/migration/100-to-110/blazor.md | 54 +++++++++++++ .../aspnetcore-11/includes/blazor.md | 6 ++ 5 files changed, 146 insertions(+) create mode 100644 aspnetcore/includes/net-prereqs-vs-11-latest.md create mode 100644 aspnetcore/includes/net-prereqs-vsc-11.0.md create mode 100644 aspnetcore/migration/100-to-110.md create mode 100644 aspnetcore/migration/100-to-110/blazor.md diff --git a/aspnetcore/includes/net-prereqs-vs-11-latest.md b/aspnetcore/includes/net-prereqs-vs-11-latest.md new file mode 100644 index 000000000000..2b192ebd3b24 --- /dev/null +++ b/aspnetcore/includes/net-prereqs-vs-11-latest.md @@ -0,0 +1,3 @@ +* [Visual Studio](https://visualstudio.microsoft.com/downloads/) with the **ASP.NET and web development** workload. + + ![VS22 installer workloads](~/tutorials/min-web-api/_static/asp-net-web-dev.png) diff --git a/aspnetcore/includes/net-prereqs-vsc-11.0.md b/aspnetcore/includes/net-prereqs-vsc-11.0.md new file mode 100644 index 000000000000..888cf9d941df --- /dev/null +++ b/aspnetcore/includes/net-prereqs-vsc-11.0.md @@ -0,0 +1,5 @@ +* [Visual Studio Code](https://code.visualstudio.com/download) +* [C# Dev Kit for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) +* [!INCLUDE [](~/includes/0-latest-SDK.md)] + +You can follow the Visual Studio Code instructions on macOS, Linux, or Windows. Changes may be required if you use an integrated development environment (IDE) other than Visual Studio Code. diff --git a/aspnetcore/migration/100-to-110.md b/aspnetcore/migration/100-to-110.md new file mode 100644 index 000000000000..7d112cc783bd --- /dev/null +++ b/aspnetcore/migration/100-to-110.md @@ -0,0 +1,78 @@ +--- +title: Migrate from ASP.NET Core in .NET 10 to ASP.NET Core in .NET 11 +author: wadepickett +description: Learn how to migrate an ASP.NET Core in .NET 10 to ASP.NET Core in .NET 11. +ms.author: wpickett +ms.date: 01/26/2026 +uid: migration/100-to-110 +--- +# Migrate from ASP.NET Core in .NET 10 to ASP.NET Core in .NET 11 + + + +This article explains how to update an ASP.NET Core in .NET 10 to ASP.NET Core in .NET 10. + +## Prerequisites + +# [Visual Studio](#tab/visual-studio) + +[!INCLUDE[](~/includes/net-prereqs-vs-11-latest.md)] + +# [Visual Studio Code](#tab/visual-studio-code) + +[!INCLUDE[](~/includes/net-prereqs-vsc-11.0.md)] + +--- + +## Update the .NET SDK version in `global.json` + +If you rely on a [`global.json`](/dotnet/core/tools/global-json) file to target a specific .NET SDK version, update the `version` property to the .NET 10 SDK version that's installed. For example: + +```diff +{ + "sdk": { +- "version": "10.0.102" ++ "version": "11.0.100" + } +} +``` + +## Update the target framework + +Update the project file's [Target Framework Moniker (TFM)](/dotnet/standard/frameworks) to `net11.0`: + +```diff + + + +- net10.0 ++ net11.0 + + + +``` + +## Update package references + +In the project file, update each [`Microsoft.AspNetCore.*`](https://www.nuget.org/packages?q=Microsoft.AspNetCore.*), [`Microsoft.EntityFrameworkCore.*`](https://www.nuget.org/packages?q=Microsoft.EntityFrameworkCore.*), [`Microsoft.Extensions.*`](https://www.nuget.org/packages?q=Microsoft.Extensions.*), and [`System.Net.Http.Json`](https://www.nuget.org/packages/System.Net.Http.Json) package reference's `Version` attribute to 11.0.0 or later. For example: + +```diff + +- +- +- +- ++ ++ ++ ++ + +``` + +## Blazor + +[!INCLUDE[](~/migration/100-to-110/includes/blazor.md)] + +## Breaking changes + +Use the articles in [Breaking changes in .NET](/dotnet/core/compatibility/breaking-changes) to find breaking changes that might apply when upgrading an app to a newer version of .NET. diff --git a/aspnetcore/migration/100-to-110/blazor.md b/aspnetcore/migration/100-to-110/blazor.md new file mode 100644 index 000000000000..f0b53860a336 --- /dev/null +++ b/aspnetcore/migration/100-to-110/blazor.md @@ -0,0 +1,54 @@ +### Blazor release notes + +For new feature coverage, see . + +### Adopt Inline JS event handler removed from the `NavMenu` component + +*This section only applies to Blazor Web Apps.* + +The inline JS event handler for the navigation bar toggler isn't present in the `NavMenu` component of the Blazor Web App project template in .NET 11 or later. Apps generated from the project template use a [collocated JS module](xref:blazor/js-interop/javascript-location#load-a-script-from-an-external-javascript-file-js-collocated-with-a-component) approach to show or hide the navigation bar on the rendered page. The approach improves [Content Security Policy (CSP) compliance](xref:blazor/security/content-security-policy) because it doesn't require the CSP to include an unsafe hash for the inline JS. + +Use the following instructions to adopt the new JS module approach for the navigation bar toggler in an existing app. + +Add a [collocated JS module](xref:blazor/js-interop/javascript-location#load-a-script-from-an-external-javascript-file-js-collocated-with-a-component) next to the app's `NavMenu` component. + +`NavMenu.razor.js`: + +```javascript +// Handle navigation menu toggle +const navScrollable = document.getElementById("nav-scrollable"); +const navToggler = document.querySelector(".navbar-toggler"); + +if (navScrollable && navToggler) { + navScrollable.addEventListener("click", function() { + navToggler.click(); + }); +} +``` + +At the top of the app's `NavMenu` component (`NavMenu.razor`), add a ` +``` + +* Otherwise, use the following tag, which indicates the path to the module in the `Components/Layout` folder: + +```razor + +``` + +Also in the app's `NavMenu` component, change the line that has the inline JS to toggler the navigation bar: + +```diff +-