Search⌘ K
AI Features

Comparing Blazor Project Templates

Explore the key differences in Blazor Server and WebAssembly project templates. Understand how each template configures services, routing, layout, and component styling. This lesson helps you identify which Blazor model suits your cross-platform web app development needs and guides you through the default project structure and code.

One way to understand the choice between the Blazor Server and Blazor WebAssembly hosting models is to review the differences in their default project templates.

Reviewing the Blazor Server project template

Let us look at the default template for a Blazor Server project. Mostly we will see that it is the same as an ASP.NET Core Razor Pages template, with a few key additions:

Step 1: Use the preferred code editor to open the PracticalApps solution or workspace and then add a new project, as defined in the following list:

  • Project template: Blazor Server App or blazorserver

  • Workspace or solution file and folder: PracticalApps

  • Project file and folder: Northwind.BlazorServer

  • Other Visual Studio options: Authentication Type: None; Configure for HTTPS: ...