Web apps - Blazor - Tooling

In this article

This article describes tools for building Blazor apps using several tools:

Select the pivot of this article that matches your tooling choice.

Note The hosted Blazor WebAssembly project template isn't available in ASP.NET Core 8.0 or later. To create a hosted Blazor WebAssembly app, a Framework option earlier than .NET 8.0 must be selected with the ASP.NET Core Hosted checkbox.

dotnet --version
dotnet new blazor -o BlazorApp
dotnet new blazorwasm -o BlazorApp

Run the app

Important When executing a Blazor Web App, run the app from the solution's server project, which is the project with a name that doesn't end in .Client.

Trust self-signed certificate dialog!

Security warning dialog!

dotnet watch
dotnet watch -lp https

Stop the app

Stop button in Visual Studio's menu bar!

Visual Studio solution file (.sln)

A solution is a container to organize one or more related code projects. Solution files use a unique format and aren't intended to be edited directly.

Visual Studio and Visual Studio Code (VS Code) use a solution file (.sln) to store settings for a solution. The .NET CLI doesn't organize projects using a solution file, but it can create solution files and list/modify the projects in solution files via the dotnet sln command. Other .NET CLI commands use the path of the solution file for various publishing, testing, and packaging commands.

For more information, see the following resources:

Blazor project templates and template options

The Blazor framework provides project templates for creating new apps. The templates are used to create new Blazor projects and solutions regardless of the tooling that you select for Blazor development (Visual Studio, Visual Studio Code, or the .NET command-line interface (CLI)):

For more information on Blazor project templates, see ASP.NET Core Blazor project structure.

Interactive render mode

Important When using a Blazor Web App, most of the Blazor documentation example components require interactivity to function and demonstrate the concepts covered by the articles. When you test an example component provided by an article, make sure that either the app adopts global interactivity or the component adopts an interactive render mode.

Interactivity location

Sample pages

Additional guidance on template options

Additional resources

Ref: Tooling for ASP.NET Core Blazor