BlazorSwa.Template 0.2.0

dotnet new install BlazorSwa.Template::0.2.0
This package contains a .NET Template Package you can call from the shell/command line.

BlazorSwa.Template

A project template for creating a Blazor WebAssembly app and an Azure Function api which will be hosted on Azure Static Web Apps.

Requirements

.NET 6 SDK with Azure workload and Azure Functions v4 runtime must be installed.

Installation

You can install the package from NuGet using this command from the .NET CLI:

dotnet new --install BlazorSwa.Template

Usage

Execute the following command from the .NET CLI:

dotnet new blazorswa -n <YourProjectName>

to create a project containing a Blazor WebAssembly client and a simple Azure Function project with isolated runtime.

If you prefer Visual Studio to create the project, search Blazor static web app in the Search for templates bar and follow the wizard.

Options

The following option is available:

  • --api Isolated/InProcess: specifies the Azure function project type (isolated runtime or in process). The default value is Isolated.

Examples

To create a Blazor WebAssembly project with an Azure Function project with isolated runtime, execute the following command from the .NET CLI:

dotnet new blazorswa --api Isolated -n <YourProjectName>

To create a Blazor WebAssembly project with an Azure Function project in process, execute the following command from the .NET CLI:

dotnet new blazorswa --api InProcess -n <YourProjectName>

Some tips

In order to debug locally the project you can install the Static Web Apps CLI. The project is available on GitHub at this link: https://github.com/Azure/static-web-apps-cli.

To create a Static Web App resource on Azure, please follow the Microsoft documentation at this link: https://docs.microsoft.com/en-us/azure/static-web-apps/get-started-portal?tabs=blazor&pivots=github#create-a-static-web-app.

Contributing

Contributions are always welcome!

If you want to submit any issues or new features, please follow these few and simple guidelines.

  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 562 6/2/2022
0.1.0 472 4/9/2022