Blazor WebAssembly 3.2.0 now available

Daniel Roth

I’m thrilled to announce that Blazor WebAssembly is now officially released. This is a fully-featured and supported release of Blazor WebAssembly that is ready for production use. Full stack web development with .NET is now here!

Get started

Getting started with Blazor WebAssembly is easy: simply go to https://blazor.net and install the latest .NET Core SDK (3.1.300 or later), which includes everything you need to build and run Blazor WebAssembly apps.

You can then create and run your first Blazor WebAssembly app by running:

dotnet new blazorwasm -o BlazorApp1
cd BlazorApp1
dotnet run

Browse to https://localhost:5001 and voilà! You’ve just built and run your first Blazor WebAssembly app!

Running Blazor WebAssembly app

To maximize your Blazor productivity, be sure to install a supported version of Visual Studio for your platform of choice:

You can find additional docs and samples on https://blazor.net.

Upgrade an existing project

If you already have an existing Blazor WebAssembly project, you can upgrade it from the 3.2.0 Release Candidate to the official 3.2.0 release by doing the following:

  • Update all Microsoft.AspNetCore.Components.WebAssembly.* and System.Net.Http.Json package references to version 3.2.0.

That’s it, you’re all set!

What is Blazor WebAssembly?

In case this is your first time learning about Blazor, let me introduce you to what Blazor WebAssembly is all about.

Blazor is an open source and cross-platform web UI framework for building single-page apps using .NET and C# instead of JavaScript. Blazor is based on a powerful and flexible component model for building rich interactive web UI. You implement Blazor UI components using a combination of .NET code and Razor syntax: an elegant melding of HTML and C#. Blazor components can seamlessly handle UI events, bind to user input, and efficiently render UI updates.

Blazor components can then be hosted in different ways to create your web app. The first supported way is called Blazor Server. In a Blazor Server app, the components run on the server using .NET Core. All UI interactions and updates are handled using a real-time WebSocket connection with the browser. Blazor Server apps are fast to load and simple to implement. Support for Blazor Server is available with .NET Core 3.1 LTS.

Blazor WebAssembly is now the second supported way to host your Blazor components: client-side in the browser using a WebAssembly-based .NET runtime. Blazor WebAssembly includes a proper .NET runtime implemented in WebAssembly, a standardized bytecode for the web. This .NET runtime is downloaded with your Blazor WebAssembly app and enables running normal .NET code directly in the browser. No plugins or code transpilation are required. Blazor WebAssembly works with all modern web browsers, both desktop and mobile. Similar to JavaScript, Blazor WebAssembly apps run securely on the user’s device from within the browser’s security sandbox. These apps can be deployed as completely standalone static sites without any .NET server component at all, or they can be paired with ASP.NET Core to enable full stack web development with .NET, where code can be effortlessly shared with the client and server.

Blazor WebAssembly comes packed with features to keep you productive on your next web app project:

Blazor in action

Blazor WebAssembly has everything you need to build fully-featured production web apps. To see all these Blazor WebAssembly features in action, checkout Steve Sanderson’s on-demand BUILD session (link should be live after 12pm PT): Modern Web UI with Blazor WebAssembly.

Ready-made components

Of course, any web app is going to need beautiful and feature rich components. A variety of Blazor UI components are available from our fantastic partners that work great in any Blazor app, including Blazor WebAssembly apps:

Open-source community

Blazor also has a thriving open-source community and ecosystem. Members of the community, (folks just like you!) have built lots of great component libraries, interop libraries, test frameworks, and more, and then made them freely available for you to use. Some great examples include:

You can find these community projects and many others listed on the Awesome Blazor GitHub repo.

LTS or Current?

Blazor WebAssembly 3.2.0 is a fully supported release under the .NET Core Support Policy. Since this is the first release of Blazor WebAssembly, it is a Current release, not an LTS release; it does not the inherit LTS status of .NET Core 3.1. This means that once Blazor WebAssembly ships with .NET 5 later this year, you will need to upgrade to .NET 5 within three months to stay in support. We expect Blazor in .NET 5 to be a highly compatible release.

What’s next?

Now that we have shipped Blazor WebAssembly, we are shifting our attention to .NET 5. Work has already started on making Blazor WebAssembly available with .NET 5, which we expect to complete for preview next month.

We also have a number of Blazor features and improvements that we are investigating for the .NET 5 & 6 wave. You can see the list of core deliverables that we are considering in the Blazor Roadmap for .NET 5 issue on GitHub. Please note that we consider this list to be highly aspirational. While we hope to deliver all of the improvements listed, there are still many unknown and plans will certainly change as we go. We also expect that there will be plenty of smaller improvements that we will deliver as well.

We are also continuing to collaborate with our friends on the Xamarin team on experimental support for building native UI using Blazor through the Mobile Blazor Bindings project. This includes some early efforts to explore building hybrid UI for native apps, which we hope to share more about soon.

Thank you

We sincerely appreciate all the enthusiastic support we have received from the Blazor community as we’ve worked to make the release a reality. The number of Blazor articles, blog posts, docs, sample apps, libraries, books, videos, presentations, workshops, courses, meetups, feature suggestions, and feedback issues that have been contributed by the community to the Blazor ecosystem even while it was still in preview has been truly outstanding. To everyone who helped make this release possible, thank you! We couldn’t have done it without you.

Try Blazor today

We hope you enjoy this release of Blazor WebAssembly. Give Blazor a try today by going to https://blazor.net. We look forward to seeing what you create with it.

As always, if you have any questions of feedback about Blazor please let us know by filing an issue on GitHub.

164 comments

Discussion is closed. Login to edit/delete existing comments.

  • Dhiogo Acioli 0

    It is a template project from scratch. I commented on AddApiAuthorization and put that code.

    I’ve read this docs about five times, but nothing makes sense. What is the relationship between connecting with google and setting up access in azure? Anyway, I already followed this step by step, but it doesn’t work.

    • Dhiogo Acioli 0

      I was working with the blazor server before. Everything I wanted to do, it worked: identity, google, facebook. But with the assembly, nothing works. Nor by creating a fake token. Something is wrong either with the template or with the version.

      • Wil Wilder Apaza Bustamante 0

        I am having the same blocking issue too. It’s a bad experience

    • Wil Wilder Apaza Bustamante 0

      this comment has been deleted.

    • Dhiogo Acioli 0

      I have already discovered the problem. It is an error in the template in the checkbox: Progressive Web Application.

      I was always testing with this option, now that I didn’t check, it worked.

      • Daniel RothMicrosoft employee 0

        Hi Dhiogo. Could you please file a GitHub issue that describes what you tried to do to setup authentication that then failed with the Progress Web Application option enabled? It sounds like this might be something we need to investigate: https://github.com/dotnet/aspnetcore/issues.

        • Dhiogo Acioli 0

          The real problem is another. I always started the client project through visual studio, but it was supposed to be the server. is this the only right way to do it?

          • Daniel RothMicrosoft employee 0

            If you’re Blazor WebAssembly app is ASP.NET Core hosted, then you should run the Server project, which will then host the Client project. The Client project can technically be run on its own, but when you’re using authentication the client needs to be able to call an OIDC configuration endpoint on the server, which won’t be running if you just run the Client project.

  • Ramon Nogueron 0

    Hi,

    I had installed Blazor webassembly 3.2.0 preview a few weeks ago. Now, I installed VS 16.6.
    Then I saw the announcement and I downloaded the SDK 3.1.300, installing it complains, it can’t. I think because it was already installed by the VS 16.6 ok, we continue.

    I create new app, blazor webassembly, uses 3.2.0, ok!

    Problem: I open previous app (created few weeks ago), also blazor webassembly, used 3.2.0-preview. I am unable to find how to update it. In nuget manager it does not show the 3.2.0 available.

    How can I update the old app?

    Thanks.
    Ray

    • Daniel RothMicrosoft employee 0

      Hi Ramon. There have been quite a few Blazor WebAssembly previews, so depending which version you are starting from the migration steps may be pretty different. We did publish preview to preview migration steps with each release, so you should be able to start with the release announcement for the preview you are currently using and then follow all of the migration steps through to fully update your app: https://devblogs.microsoft.com/aspnet/category/blazor/.

  • - noctis - 0

    Congratulations for the release. We’re eager to try out Blazor WASM and updated visual studio just to do that. However, we got the following error when trying to build from the default Blazor WASM project template.

    Package System.Text.Encodings.Web 4.7.0 is not compatible with netstandard2.1 (.NETStandard,Version=v2.1). Package System.Text.Encodings.Web 4.7.0 does not support any target frameworks. BlazorApp2 C:\Users\user\source\repos\BlazorApp2\BlazorApp2\BlazorApp2.csproj.

    Been googling around but didn’t found the solutions, so we thought posting here might help us to get some clues.

    • Daniel RothMicrosoft employee 0

      I’m sorry your hitting issues! A couple things to try:

      • Run dotnet --version from the project folder and verify the output returns “3.1.300”
      • Run dotnet restore from the project folder and makes sure the project restores cleanly
      • Run dotnet run from the project folder and see if the app builds and runs successfully
      • - noctis - 0

        Thanks for the reply.

        We’ve tried your solution but it does not work unfortunately. Here’s some screen shoot for the command prompt result and the problematic package seen from solution explorer.

      • - noctis - 0

        We was able to fix the issue by manually updating

        System.Text.Encodings.Web

        from version 4.7.0 to 4.7.1.

  • Иван Ночной 0

    Well done, thanks for the work! Please consider the possibility of a progressive initial download. The initial download time for a slow 3G connection (emulated in browser’s devtools ) before the first visible screen is 55 seconds, compared to 13 seconds of a traditional web 1.0 site.

  • Mark Greenwood (Group) 0

    Yay well done all – so glad it’s finally real!
    Been working with Blazor for a year and so glad it’s stable and ready for production now – awesome work!

  • Christian McGowan 0

    Hi Daniel,

    I’m a CEO of a Dev Company. We currently use WinForms and are looking at building a SaaS version of our Products. I think that the Blazer route could be a good way forward for us, however when I put the question to our developer his response was “basically ANYTHING that doesnt run clientside (javascript) will be slow as it has to ping and pong the server for everything, meaning all the workload is on the server, when you have all those client cpu’s doing nothing, its better to have the operational code on the client and just request data from the server, its cheaper, faster, more responsive and more reliable. After using javascript frameworks on client side for so long, offering faster responsive single page apps with no real load waits for page changes – over mvc/razor style server side everything which is where we were in year 2000.” – I’m not is a position to validate/de-bunk his response so hoping you could let me know what your response would be?

    Regards

    Christian

    • Иван Ночной 0

      I am not Daniel, but I will express my opinion.

      It depends on the application. In many web applications, almost every action requires access to the server. For example, go to the Amazon or Facebook page, disconnect from the Internet and try to click somewhere. How many clicks can you make before an application throws an error? 1 to 3 no more.

      If you are creating an online store, news site, translator or any application that requires a permanent network connection, then Blazor server is a good choice. If you are doing a photo editor, diagram editor, drawing tool, arcade game, then Blazor server will not work well.

      Blazor server is somewhere between traditional and SPA apps. And, by the way, do not think that users will be grateful to you for loading their processors.

    • Daniel RothMicrosoft employee 0

      Hi Christian. The good news is that Blazor WebAssembly does run client-side in the browser, just like a JavaScript based app does. Your .NET code runs in the browser using a WebAssembly based .NET runtime that you deploy with your app. To see Blazor WebAssembly in action check out: https://aka.ms/blazor-in-action.

  • Michael Lopez 0

    Thanks, Daniel. I love Blazor.

    I don’t see the updated version in NuGet. How do I update my existing project?

    Also, I’m using VS 2019 Preview. Will that cause a problem?

    Thank you,
    Mike

  • N 0

    Daniel

    after upgrading i running into a problem which surfaces only when compiled in release version, works fine in debug version.
    I am using custom Authentication

    Severity Code Description Project File Line Suppression State
    Error Unhandled exception. Mono.Linker.MarkException: Error processing method: ‘System.Void Microsoft.Extensions.DependencyInjection.MvcCoreMvcCoreBuilderExtensions::AddAuthorizationServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)’ in assembly: ‘Microsoft.AspNetCore.Mvc.Core.dll’ BlazorWebAssembly.Client C:\Users\XXXXX.nuget\packages\microsoft.aspnetcore.components.webassembly.build\3.2.0\targets\Blazor.MonoRuntime.targets 326

    looks like it is related to this package

    any adivse on how to get around this ?

    i have tried different version(even pre-released one ) for

    • Daniel RothMicrosoft employee 0

      You’re hitting a linker error, which I think you should report to in the https://github.com/mono/mono/issues repo. It surprises me though that you have a dependency in your Blazor WebAssembly app on MVC. Is that intentional?

      • Wil Wilder Apaza Bustamante 0

        this comment has been deleted.

      • N 0

        I will file issue.
        Not intentional, I used tempalte from V2019 preview to create blazor webassembly hosted app.
        The linker issue appears because of

        
        

        adding false does resolve it though, not sure if that is the right way to fix.

        false

        after disabling linking i can publish to azure app service but i am now finding that none of the api calls to hosted .net core are working. I did open the issue for this.

  • Timothy Kelley 0

    Awesome! Thanks so much for all the effort. I’ve had a blast developing with Blazor. Starting to actually enjoy going to work again ;p

  • Ed Hansen 0

    Job well done, Dan. Congratulations!
    I’m a beginner with Blazor. I created a WASM with the Release Candidate. I don’t understand how to upgrade it.

    “Update all Microsoft.AspNetCore.Components.WebAssembly.* and System.Net.Http.Json package references to version 3.2.0.”

    What is the procedure to follow?

    Many Thanks.

    • Dhiogo Acioli 0

      update nuget packages

      • Ed Hansen 0

        Thanks, Dhiogo.

Feedback usabilla icon