Azure Static Web Apps - Blazor WebAssembly
JJ Bussert
03/02/2023
Azure Static Web Apps - Blazor WebAssembly
In the (Getting Started)[xref:azure-swa-getting-started] post, we discussed the basics of Azure Static Web Apps and how to get started with a simple static web app. In this post, we will take a look at an example of a Blazor WebAssembly app and how to deploy it to Azure Static Web Apps.
Create a new Blazor WebAssembly app
To get started, we will create a new Blazor WebAssembly app using the .NET CLI. Open a terminal and run the following commands:
winget install
npm install --save-dev @azure/static-web-apps-cli
dotnet new blazorwasm -o App
cd App
dotnet add package Microsoft.AspNetCore.Components.WebAssembly.StaticWebAssets
cd ..
func init MyProject.Api --dotnet
Rename-Item MyProject.Api Api
Special Thanks to Pankaj Patel on Unsplash for the photo used for this post