Microsoft Updates Blazor, Now Built on Razor Components
The new update comes after the dev team separated the client-side and server-side elements of the project, with the latter being renamed ASP.NET Core Razor Components, now part of the .NET Core 3.0 effort.
Razor Components was separated out from the client-side efforts because those ran into some problems, some related to working with the also-experimental WebAssembly project that provides a compilation target for C# and other higher-order programming languages so they can be used for Web development.
At the time, independent Blazor expert Chris Sainty provided more information in a post:
The simple fact is that the client-side model relies not only on WebAssembly but also the efforts of the Mono team and their WASM .NET runtime. While progress is being made extremely quickly it's not quite there yet. AOT is not an option, there is extremely limited debugging, performance needs to be improved, download sizes are too big, etc.
The server-side model gives Microsoft a chance to get Blazor out there to people almost immediately. And as it runs on good old .NET Core it's also got a solid base. It's also important to remember that due to the Blazor architecture, with its separation of app execution from rendering, any developments made will benefit both models. So client-side is not going to get left behind.
Blazor team lead Daniel Roth provided an update on that situation in a post last week announcing Blazor 0.8.0. "As was recently announced, server-side Blazor is now shipping as ASP.NET Core Razor Components in .NET Core 3.0," he said. "We've integrated the Blazor component model into ASP.NET Core 3.0 and renamed it to Razor Components. Blazor 0.8.0 is now built on Razor Components and enables you to host Razor Components in the browser on WebAssembly."
Another new development is that Blazor tooling is now included in the second preview of Visual Studio 2019.
"Previously to get tooling support for Blazor projects you needed to install the Blazor extension for Visual Studio," said Roth. "Starting with Visual Studio 2019 Preview 2, tooling support for Razor Components (and hence Blazor apps) is already included without having to install anything else. The Blazor extension is now only needed to install the Blazor project templates in Visual Studio."
After noting some .NET runtime improvements, known issues and guidance for updating existing projects, Roth reviewed Blazor's present status and future.
"This release of Blazor was primarily focused on first integrating Razor Components into ASP.NET Core 3.0 and then rebuilding Blazor on top of that," Roth said. "Going forward, we plan to ship Blazor updates with each .NET Core 3.0 update.
"Blazor, and support for running Razor Components on WebAssembly in the browser, won't ship with .NET Core 3.0, but we continue to work towards shipping Blazor some later date."
David Ramel is the editor of Visual Studio Magazine.