Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions aspnetcore/blazor/hybrid/tutorials/maui-blazor-web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -382,6 +389,24 @@ Project references:

Add the following <xref:Microsoft.AspNetCore.Components.Routing.Router.AdditionalAssemblies%2A> 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
<Router AppAssembly="@typeof(Routes).Assembly" NotFoundPage="typeof(Pages.NotFound)"
AdditionalAssemblies="new [] { typeof(MauiBlazorWeb.Shared.Client._Imports).Assembly }">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Components.Layout.MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
</Router>
```

:::moniker-end

:::moniker range=">= aspnetcore-9.0 < aspnetcore-10.0"

```razor
<Router AppAssembly="@typeof(Routes).Assembly"
AdditionalAssemblies="new [] { typeof(MauiBlazorWeb.Shared.Client._Imports).Assembly }">
Expand All @@ -392,6 +417,10 @@ Add the following <xref:Microsoft.AspNetCore.Components.Routing.Router.Additiona
</Router>
```

:::moniker-end

:::moniker range=">= aspnetcore-9.0"

Add the `MauiBlazorWeb.Shared.Client` project assembly (via its `_Imports` file) with the following <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilderExtensions.AddAdditionalAssemblies%2A> call in the `MauiBlazorWeb.Web` project's `Program.cs` file:

```csharp
Expand Down
6 changes: 4 additions & 2 deletions aspnetcore/test/localhost-tld.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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

Expand Down
Loading