You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/blazor/hybrid/tutorials/maui-blazor-web-app.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to build a .NET MAUI Blazor Hybrid app with a Blazor Web
5
5
monikerRange: '>= aspnetcore-8.0'
6
6
ms.author: wpickett
7
7
ms.custom: mvc
8
-
ms.date: 11/11/2025
8
+
ms.date: 11/21/2025
9
9
uid: blazor/hybrid/tutorials/maui-blazor-web-app
10
10
---
11
11
# 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
51
51
52
52
:::moniker-end
53
53
54
-
:::moniker range="< aspnetcore-9.0"
54
+
:::moniker range="< aspnetcore-10.0"
55
55
56
56
## .NET MAUI Blazor Hybrid and Web App sample app
57
57
58
-
[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).
58
+
[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).
59
59
60
60
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.
61
61
62
+
:::moniker-end
63
+
64
+
:::moniker range="< aspnetcore-9.0"
65
+
62
66
## Migrating a .NET MAUI Blazor Hybrid solution
63
67
64
68
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.
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:
@@ -392,6 +417,10 @@ Add the following <xref:Microsoft.AspNetCore.Components.Routing.Router.Additiona
392
417
</Router>
393
418
```
394
419
420
+
:::moniker-end
421
+
422
+
:::moniker range=">= aspnetcore-9.0"
423
+
395
424
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:
0 commit comments