From 8fc804934fd0ec7fc3fa487201507debc7036286 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:45:52 -0500 Subject: [PATCH 1/2] Update MAUI Blazor Hybrid app with BWA tutorial (#36384) --- .../hybrid/tutorials/maui-blazor-web-app.md | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/aspnetcore/blazor/hybrid/tutorials/maui-blazor-web-app.md b/aspnetcore/blazor/hybrid/tutorials/maui-blazor-web-app.md index addb70fd1bb6..5f0f14d75554 100644 --- a/aspnetcore/blazor/hybrid/tutorials/maui-blazor-web-app.md +++ b/aspnetcore/blazor/hybrid/tutorials/maui-blazor-web-app.md @@ -5,7 +5,7 @@ description: Learn how to build a .NET MAUI Blazor Hybrid app with a Blazor Web monikerRange: '>= aspnetcore-8.0' ms.author: wpickett ms.custom: mvc -ms.date: 11/11/2025 +ms.date: 11/21/2025 uid: blazor/hybrid/tutorials/maui-blazor-web-app --- # Build a .NET MAUI Blazor Hybrid app with a Blazor Web App @@ -51,14 +51,18 @@ The preceding command produces a Blazor app that adopts global interactivity, wh :::moniker-end -:::moniker range="< aspnetcore-9.0" +:::moniker range="< aspnetcore-10.0" ## .NET MAUI Blazor Hybrid and Web App sample app -[Obtain the sample app](xref:blazor/fundamentals/index#sample-apps) named `MauiBlazorWeb` from the [Blazor samples GitHub repository (`dotnet/blazor-samples`)](https://github.com/dotnet/blazor-samples) (.NET 8 or later). +[Obtain the sample app](xref:blazor/fundamentals/index#sample-apps) named `MauiBlazorWeb` from the [Blazor samples GitHub repository (`dotnet/blazor-samples`)](https://github.com/dotnet/blazor-samples) (`8.0` or `9.0` folder). The sample app is a starter solution that contains a .NET MAUI Blazor Hybrid (native, cross-platform) app, a Blazor Web App, and a Razor class library (RCL) that contains the shared UI (Razor components) used by the native and web apps. +:::moniker-end + +:::moniker range="< aspnetcore-9.0" + ## Migrating a .NET MAUI Blazor Hybrid solution Instead of [using the sample app](#net-maui-blazor-hybrid-and-web-app-sample-app), you can migrate an existing .NET MAUI Blazor Hybrid app with the guidance in this section using Visual Studio. @@ -197,6 +201,9 @@ Render mode specification subsections: * [Global Server interactivity](#global-server-interactivity) * [Global Auto or WebAssembly interactivity](#global-auto-or-webassembly-interactivity) +* [Per-page/component Server interactivity](#per-pagecomponent-server-interactivity) +* [Per-page/component Auto interactivity](#per-pagecomponent-auto-interactivity) +* [Per-page/component WebAssembly interactivity](#per-pagecomponent-webassembly-interactivity) :::moniker-end @@ -382,6 +389,24 @@ Project references: Add the following parameter to the `Router` component instance for the `MauiBlazorWeb.Shared.Client` project assembly (via its `_Imports` file) in the `MauiBlazorWeb.Shared` project's `Routes.razor` file: +:::moniker-end + +:::moniker range=">= aspnetcore-10.0" + +```razor + + + + + + +``` + +:::moniker-end + +:::moniker range=">= aspnetcore-9.0 < aspnetcore-10.0" + ```razor @@ -392,6 +417,10 @@ Add the following ``` +:::moniker-end + +:::moniker range=">= aspnetcore-9.0" + Add the `MauiBlazorWeb.Shared.Client` project assembly (via its `_Imports` file) with the following call in the `MauiBlazorWeb.Web` project's `Program.cs` file: ```csharp From 57c0b4e8cf652ec9084667e6f8a50e7496be2845 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 14:17:16 -0800 Subject: [PATCH 2/2] Document Safari's lack of *.localhost domain support (#36374) * Initial plan * Add Safari compatibility note to localhost-tld.md Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> * Apply suggestions from code review - clarified "client" app. * Update aspnetcore/test/localhost-tld.md Co-authored-by: Tom Dykstra --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> Co-authored-by: Wade Pickett Co-authored-by: Tom Dykstra --- aspnetcore/test/localhost-tld.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aspnetcore/test/localhost-tld.md b/aspnetcore/test/localhost-tld.md index fa59e6f797eb..7b01857b3ba5 100644 --- a/aspnetcore/test/localhost-tld.md +++ b/aspnetcore/test/localhost-tld.md @@ -4,7 +4,7 @@ description: Learn how using localhost as top-level domain can make testing easi monikerRange: '>= aspnetcore-10.0' ms.author: tdykstra ms.custom: -ms.date: 08/26/2025 +ms.date: 11/19/2025 title: Support for the .localhost top-level domain uid: test/localhost-tld --- @@ -23,7 +23,9 @@ ASP.NET Core's built-in HTTP server, Kestrel, correctly treats any `*.localhost` ## Browser compatibility -While web browsers automatically resolve `*.localhost` names to the local loopback address, other apps might treat `*.localhost` names as regular domain names and attempt to resolve them via their corresponding DNS stack. If your DNS configuration doesn't resolve `*.localhost` names to an address, they fail to connect. You can continue to use the regular `localhost` name to address your apps when not in a web browser. +While most modern evergreen browsers automatically resolve `*.localhost` names to the local loopback address, Safari on macOS doesn't support this feature. In Safari, you should use the regular `localhost` name instead of `*.localhost` domain names. + +Some client apps other than Safari and evergreen web browsers treat `*.localhost` names as regular domain names and attempt to resolve them via their corresponding DNS stack. If your DNS configuration doesn't resolve `*.localhost` names to an address, they fail to connect. You can continue to use the regular `localhost` name to address your apps when not in a web browser. ## HTTPS development certificate