Blazor 0.5.0 is here. Blazor is an experimental .NET client-side web framework that uses c# and HTML. It runs on a browser using WebAssembly mechanism. Here component logic and DOM interactions occur in the same process. The latest release includes features such as server-side Blazor, a new startup model, and early support for in-browser debugging among other updates.
Let’s discuss the highlights of Blazor 0.5.0 release.
Blazor 0.5.0 release makes it possible to adopt the out-of-process model for Blazor by stretching it over a network connection so that you can run Blazor on the server with ease.
New Startup Model
Blazor 0.5.0 projects now make use of a new startup model, similar to the startup model in ASP.NET Core.
To configure the services for your Blazor app, each Blazor project consists of a Startup class with a ConfigureServices method. There’s also a Configure method for configuring the root components of the application.
Adding Blazor to HTML file
In earlier releases, the project build had modified index.html in order to replace the blazor-boot script tag with a real script tag. This made it difficult to use Blazor in arbitrary HTML files.
This mechanism has now been replaced in Blazor 0.5.0. You can add a script tag for client-side projects that references the _framework/blazor.webassembly.js script (which is generated as part of the build). You can add the script reference _framework/blazor.server.js. for server-side projects.
Support for in-browser debugging
Blazor 0.5.0 provides very basic debugging support in Chrome for client-side Blazor apps that run on WebAssembly. Despite the debugging support being limited and unpolished, it does show the basic debugging infrastructure.
For more info on Blazor 0.5.0 updates, check out the official release notes.