Reviewing the Blazor Web App project template
Before .NET 8, there were separate project templates for the different hosting models, for example, Blazor Server App, Blazor WebAssembly App, and Blazor WebAssembly App Empty. .NET 8 introduced a unified project template, named Blazor Web App, and a client-only project template, renamed Blazor WebAssembly Standalone App. Avoid using the other legacy project templates unless you must use older .NET SDKs.
Creating a Blazor Web App project
Let’s look at the default template for a Blazor Web App project. Mostly, you will see that it is the same as an ASP.NET Core Empty template, with a few key additions:
- Use your preferred code editor to open the
ModernWeb
solution, and then add a new project, as defined in the following list:- Project template: Blazor Web App /
blazor --interactivity Auto
- Solution file and folder:
ModernWeb
- Project file and folder:
Northwind.Blazor
- Authentication...
- Project template: Blazor Web App /