Blazor moved from experiment to Preview

Original author: Daniel Roth
  • Transfer
With this new release, we are pleased to announce that Blazor is now in a preview phase ! Blazor is no longer experimental, and we are committed to providing it as a supported web interface framework, including support for client-side launch in a browser on WebAssembly.

A little over a year ago, we launched the Blazor pilot project with the goal of creating a client-side web framework based on .NET and WebAssembly. At that time, Blazor was a little bigger than a prototype, and there were many open questions about the viability of running .NET in a browser. Since then, we have released nine experimental Blazor releases dedicated to various issues, including the component model, data binding, event processing, routing, layouts, application size, hosting models, debugging, and tools. We are now at a point where we think Blazor is ready to take his next step.

Simplify naming and versioning

Earlier in some cases we used the terminology of Razor Components , and in others Blazor . This was confusing, therefore, following numerous community reviews, we decided to abandon the ASP.NET Core Razor Components name and instead return to the Server-side Blazor name .

This emphasizes that Blazor is a single client application model with multiple hosting models:

  • Server-side Blazor - running on a server through SignalR
  • Client-side Blazor - working on the client side on WebAssembly

... but in any case, it's still the same programming model. The same Blazor components can be placed in both environments.

Also, since Blazor is now part of .NET Core, client-side Blazor packages now correspond to .NET Core 3.0 versions. For example, the version number of all preview packages that we send today is 3.0.0-preview4-19216-03 . We no longer use separate 0.x version numbers for client-side Blazor packages.

What and when will be delivered

  • Server-side Blazor will ship as part of .NET Core 3.0. This was already announced last October.
  • Client-side Blazor will not ship as part of the initial release of .NET Core 3.0, but we are now announcing that it will ship as part of a future release of .NET Core (and therefore is no longer an “experiment”).

With each preview release of .NET Core 3.0, we will continue to deliver preview releases of both the server and client versions of Blazor.

Today's preview release

New features in this preview version:

  • Updated templates to use the .razor file extension
  • _Imports.razor
  • Scope components with using
  • New component item template
  • New Blazor Icons
  • Blazor Support in Visual Studio Code

Check out the announcement of ASP.NET Core 3.0 Preview 4 for more information on these improvements. See also the Blazor release notes for more information on this preview version.

Get the Blazor Preview

To get started with the Blazor preview version, install the following:

  1. .NET Core 3.0 Preview 4 SDK (3.0.100-preview4-011223)
  2. Blazor templates via command line:

    dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview4-19216-03
  3. Visual Studio 2019 Preview with ASP.NET and the selected web development workload , as well as the latest Blazor extension from the Visual Studio Marketplace or Visual Studio Code with the latest version of the C # extension (now with Blazor support !).

You can find getting started instructions, documentation, and training materials for Blazor on our new Blazor homepage - .


Update to Blazor Preview

To upgrade existing Blazor applications to preview, first make sure that the prerequisites listed above are installed, and then follow these steps:

  • Update all package links in Microsoft.AspNetCore.Blazor. * Packages to 3.0.0-preview4-19216-03.
  • Remove all package links on Microsoft.AspNetCore.Components.Server.
  • Remove all DotNetCliToolReference in Microsoft.AspNetCore.Blazor.Cli, replace them with a link to the Microsoft.AspNetCore.Blazor.DevServer package.
  • In Blazor client projects, remove the imageand properties image.
  • In Blazor client projects, add a property image.
  • Rename all _ViewImports.cshtml files to _Imports.razor .
  • Rename all remaining .cshtml files to .razor.
  • Rename components.webassembly.js to blazor.webassembly.js
  • Remove any use of the Microsoft.AspNetCore.Components.Services namespace and replace it with Microsoft.AspNetCore.Components if necessary .
  • Update server projects to use endpoint routing:

    // Замените это:
    app.UseMvc(routes =>
        routes.MapRoute(name: "default", template: "{controller}/{action}/{id?}");
    // Этим:
    app.UseEndpoints(routes =>
  • Run dotnet clean in the solution to clean old Razor declarations.

Blazor community page is now Awesome Blazor

As part of the Blazor site update, we decided to remove the Blazor community page and instead direct people to the community-driven Awesome Blazor site . Thank you Adrien Torris for keeping this really awesome Blazor resource list!

Explore the Blazor-UI preview from Telerik, DevExpress and Syncfusion

Blazor is evolving with the help of an active and supportive community that has added all possible examples of applications, components and libraries to the Blazor ecosystem. Recently, popular component suppliers, such as Telerik , DevExpress and Syncfusion , have joined us and introduced the Blazor UI preview components. We recommend that you try these Blazor UI options and let them know what you think.

Give feedback

We hope you enjoy this Blazor preview release. As in previous releases, your feedback is very important. If you have any problems or questions while testing Blazor, you can write on GitHub . You can also contact us and the Blazor community on Gitter if you are stuck or want to share how Blazor works for you. After you have been testing Blazor for some time, please let us know what you think by participating in our survey. Click on the survey link shown on the application’s home page when you start one of the Blazor project templates:

Thank you for trying Blazor!

Also popular now: