convert-blazor-server-to-webapp

Featured

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 Apps (already use AddRazorComponents and MapRazorComponents), Blazor WebAssembly or hosted Blazor WebAssembly apps (different migration path), apps that should stay on the Blazor Server hosting model without converting, or apps still targeting .NET Framework.

Web & Frontend 479 stars 35 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 92/100

Stars 20%
89
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Convert Blazor Server App to Blazor Web App 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. ## When to Use - Migrating a Blazor Server app from .NET 6 or .NET 7 to .NET 8+ - App currently uses `AddServerSideBlazor()` and `MapBlazorHub()` in `Program.cs` (or `Startup.cs`) - App uses `Pages/_Host.cshtml` (or `_Host.razor`) as the host page with Component Tag Helpers - Want to adopt new Blazor Web App features while keeping interactive server rendering ## When Not to Use - **The app already uses `AddRazorComponents` 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. - Blazor WebAssembly or hosted Blazor WebAssembly app — these have a different migration path - The app should stay on the legacy Blazor Server hosting model (just update TFM and packages) - The app targets .NET Framework — it must be migrated to .NET first ## Inputs | Input | Required | Description | |-------|----------|--...

Details

Author
managedcode
Repository
managedcode/dotnet-skills
Created
6 months ago
Last Updated
6 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Featured

blazor

Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices. USE FOR: building interactive web UIs with C# instead of JavaScript; choosing between Server, WebAssembly, or Auto render modes; designing component hierarchies and state. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

479 Updated 6 days ago
managedcode
AI & Automation Listed

aspnet-blazor

Blazor Server, WebAssembly, and United (Auto) with components, interop, and render modes. Covers .NET 8+ Blazor patterns. USE WHEN: user mentions "Blazor", "Blazor Server", "Blazor WASM", "Blazor WebAssembly", "Blazor components", "render modes", "Blazor interop" DO NOT USE FOR: Angular components - use `angular`, React components - use `react`, Svelte - use `svelte`

33 Updated today
claude-dev-suite
AI & Automation Listed

classic-asp-to-aspnet-mvc

Conventions and a working playbook for porting Classic ASP or Web Forms sites to ASP.NET Core MVC on net10.0: Program.cs composition, controllers and routing, view models, Razor layouts, sections and partial views, wwwroot assets, configuration through validated options instead of raw configuration keys, secrets in user secrets locally and Azure Key Vault in production, Dapper repositories behind Abstractions interfaces, and typed HttpClient services that return models rather than transport objects. Use this skill whenever migrating a Classic ASP, ASP, or Web Forms application to ASP.NET Core MVC, reviewing such a migration, scaffolding the MVC layout for a ported site, or deciding where ported inline logic belongs in the new structure.

1 Updated 1 months ago
GuerthCastro