Hosting both Blazor Server and WebAssembly in single website

Blazor framework supports 2 types of hosting and running of Blazor application. Blazor Server runs application on server inside ASP.NET Core application and only exchanges HTML fragments and events with client. And Blazor WebAssembly runs application completely inside web browser and in some cases does not need server at all. What if you want to use both models in the same application and run different type based on client device type.


Configure Blazor app from server

Microsoft recently release Blazor WebAssembly 3.2.0 Release Candidate. This version includes configuration of an application by appsettings.json configuration file.


Blazor and .NET Core 3.1.1

Few days ago updated version of .NET Core 3.1.1 was released. It includes several security fixes, so it is strongly recommend to upgrade. However, after installation I was not able to build Blazor projects with client-side Blazor. Build failed with error: