Migrating to a .NET MAUI Blazor app
Instead of doing everything from scratch, we can use both the XAML and Blazor UIs in our app by changing the project configuration referring to the project that we created in the previous section. We will use a mixed XAML and Blazor user interface in one app for a while until we move everything to Blazor.
To convert our app into a .NET MAUI Blazor app, we need to make the following changes:
- Change the SDK from
Microsoft.NET.Sdk
toMicrosoft.NET.Sdk.Razor
in the project file since the .NET MAUI Blazor app uses a different SDK.
In the PassXYZ.Vault.csproj
project file, we have the following line:
<Project Sdk="Microsoft.NET.Sdk">
We need to replace it with the following line:
<Project Sdk="Microsoft.NET.Sdk.Razor">
- Copy the following folders from the new project that we just created into our app:
wwwroot
Shared
- Copy the following files from the new project into our app:
_Imports.razor...