Tag Archives: .Net

BlazorWasm template for Visual Studio 2019

As of Dotnet Core 3.1 Preview1 (3.1.0-preview1.19506.1), the blazorwasm template is missing from the default manifest.

If you’re following FreeCodeCamp – How to create a SPA with Razor pages and Blazor then this is a problem for you! As well, the New Project UI has changed and does not follow the VS 2017 flow.

The solution is found here. Use the dotnet CLI to add the blazorwasm template and then to create the demo project.

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview1.19508.20

Now dotnet new -l will show blazorwasm as a template option.

dotnet new -l

Templates                 Short Name    Language     Tags
----------------------------------------------------------------------------------------------------------------------------------
Blazor Server App       blazorserver    [C#]         Web/Blazor
Blazor WebAssembly App  blazorwasm      [C#]         Web/Blazor
                                                     /WebAssembly

And now, create the demo Solution :

dotnet new blazorwasm --hosted -o BlazorSPA

This creates the 3-project solution (--hosted) under the new folder blazorwasm (-o blazorwasm).

Update Oct 21, 2019 – Found “Get Started w/ ASP.NET Core Blazor” page, including Dotnet Core 3.1 compatible template.