Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dotnet/convert-blazor-server-to-webapp
Guides conversion of a pre-.NET 8 Blazor Server app into a .NET 8+ Blazor Web App. USE FOR: migrating apps that use AddServerSideBlazor and MapBlazorHub to the AddRazorComponents/MapRazorComponents model, converting _Host.cshtml to an App.razor root component, replacing blazor.server.js with blazor.web.js, migrating CascadingAuthenticationState to a service, adopting new Blazor Web App features like enhanced navigation and streaming rendering. DO NOT USE FOR: apps that are already Blazor Web App
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
1 fixed20 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
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.
| Checked | Without skill | With skill |
|---|---|---|
| The response replaces the CascadingAuthenticationState component wrapper with AddCascadingAuthenticationState service registration. | Missed | Passed |
| The response configures AddRazorComponents in Program.cs. | Passed | Passed |
The instructions your model reads when the skill loads.
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.test cases passed, vs 20 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.