Blazor Project Template

Blazor Web Assembly Template

Sebastian Faltoni from the ServiceStack community is maintaining a .NET 6.0 Blazor WASM Template

A New ServiceStack + Blazor WASM templates can be created with:

$ x new nukedbit/blazor-wasm-servicestack ProjectName

Executing in a Standalone Desktop app

For an even better integrated Desktop App Experience you can also use ServiceStack's app dotnet tool to run your Blazor Desktop Apps as a Chromium Desktop App:

$ dotnet tool update -g app
$ x new nukedbit/blazor-wasm-servicestack Acme
$ cd Acme\Acme
$ dotnet public -c Release
$ cd bin\Release\net5.0\publish
$ app Acme.dll

Blazor Service Client

As we track Blazor's progress we've created an official API for creating C#/.NET Service Client instances with:

var client = BlazorClient.Create(baseUrl);

Which returns a JsonHttpClient stripped of features that are known not to work in Blazor, we'll keep it updated as Blazor gains support for additional features.

This API also lets you modify the MessageHandler all Blazor client instances are configured with:

BlazorClient.MessageHandler = new HttpClientHandler { ... };