Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides migrating a pre-.NET 8 Blazor Server app to a .NET 8+ Blazor Web App with AddRazorComponents and App.razor.
91% 95%+5 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
We are upgrading our internal administration portal from .NET 7 Blazor Server to .NET 8. Currently, the project uses the traditional server-side hosting model with `_Host.cshtml`. Please guide me through converting this project into a modern Blazor Web App while preserving interactive server behavior. Provide a clear step-by-step refactoring plan along with updated versions of our entry point files, component layout structures, and service registration pipeline.
The response replaces the CascadingAuthenticationState component wrapper with AddCascadingAuthenticationState service registration.
3 of 3 safety checks passed
This skill helps an agent convert a pre-.NET 8 Blazor Server app into a .NET 8+ Blazor Web App. The old hosting model uses AddServerSideBlazor/MapBlazorHub with a _Host.cshtml Razor Page as the entry point. The new Blazor Web App model uses AddRazorComponents/MapRazorComponents with an App.razor root component, enabling per-component render modes, enhanced navigation, streaming rendering, and other .NET 8+ features. The converted app uses InteractiveServer render mode to preserve existing interactive behavior.
AddServerSideBlazor() and MapBlazorHub() in Program.cs (or Startup.cs)Pages/_Host.cshtml (or _Host.razor) as the host page with Component Tag HelpersAddRazorComponents and MapRazorComponents. It is already a Blazor Web App — no conversion is needed. Stop here and tell the user the app is already using the Blazor Web App model.| Input | Required | Description |
|---|---|---|
| Blazor Server project | Yes | The .csproj and source files of the Blazor Server app |
| Target framework | Yes | .NET 8 or later (e.g., net8.0, net9.0, net10.0) |
Program.cs or Startup.cs | Yes | The app's service and middleware configuration |
_Host.cshtml location | Recommended | Usually Pages/_Host.cshtml; may be _Host.razor in some projects |
Commit strategy: Commit after each logical step so the migration is reviewable and bisectable.
Update the .csproj file:
<TargetFramework>net8.0</TargetFramework>
Microsoft.AspNetCore.*, Microsoft.EntityFrameworkCore.*, Microsoft.Extensions.*, and System.Net.Http.Json package references to the matching version.Next to this one in the catalogue, plus more from the same author.