Blazor WebAssembly 3.2.0 Preview 3 release now available

Daniel Roth

A new preview update of Blazor WebAssembly is now available! Here’s what’s new in this release:

  • Debugging in Visual Studio and Visual Studio Code
  • Auto-rebuild in Visual Studio
  • Configuration
  • New HttpClient extension methods for JSON handling

Get started

To get started with Blazor WebAssembly 3.2.0 Preview 3 install the latest .NET Core 3.1 SDK.

NOTE: Version 3.1.201 or later of the .NET Core SDK is required to use this Blazor WebAssembly release! Make sure you have the correct .NET Core SDK version by running dotnet --version from a command prompt.

Once you have the appropriate .NET Core SDK installed, run the following command to install the updated Blazor WebAssembly template:

dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview3.20168.3

If you’re on Windows using Visual Studio, we recommend installing the latest preview of Visual Studio 2019 16.6. Installing Visual Studio 2019 16.6 Preview 2 or later will also install an updated version of the .NET Core 3.1 SDK that includes the Blazor WebAssembly template, so you don’t need to separately install it.

That’s it! You can find additional docs and samples on

Upgrade an existing project

To upgrade an existing Blazor WebAssembly app from 3.2.0 Preview 2 to 3.2.0 Preview 3:

  • Update all Microsoft.AspNetCore.Components.WebAssembly.* package references to version 3.2.0-preview3.20168.3.
  • Update all Microsoft.AspNetCore.Blazor.* package references to version 3.2.0-preview3.20168.3.

You’re all set – easy peasy!


You can now debug Blazor WebAssembly apps directly from Visual Studio and Visual Studio Code. You can set breakpoints, inspect locals, and step through your code. You can also simultaneously debug your Blazor WebAssembly app and any .NET code running on the server. Using the browser dev tools to debug your Blazor WebAssembly apps is also still supported.

Enable debugging

To enable debugging in an existing Blazor WebAssembly app, update launchSettings.json in the startup project of your app to include the following inspectUri property in each launch profile:

"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"

This property enables the IDE to detect that this is a Blazor WebAssembly app and instructs the script debugging infrastructure to connect to the browser through Blazor’s debugging proxy.

Once updated, your launchSettings.json file should look something like this:

    "iisSettings": {
      "windowsAuthentication": false,
      "anonymousAuthentication": true,
      "iisExpress": {
        "applicationUrl": "http://localhost:50454",
        "sslPort": 44399
    "profiles": {
      "IIS Express": {
        "commandName": "IISExpress",
        "launchBrowser": true,
        "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
        "environmentVariables": {
          "ASPNETCORE_ENVIRONMENT": "Development"
      "BlazorApp1.Server": {
        "commandName": "Project",
        "launchBrowser": true,
        "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
        "applicationUrl": "https://localhost:5001;http://localhost:5000",
        "environmentVariables": {
          "ASPNETCORE_ENVIRONMENT": "Development"

Visual Studio

To debug a Blazor WebAssembly app in Visual Studio:

  1. Ensure you have installed the latest preview release of Visual Studio 2019 16.6 or later.
  2. Create a new ASP.NET Core hosted Blazor WebAssembly app.
  3. Hit F5 to run the app in the debugger.
  4. Set a breakpoint in Counter.razor in the IncrementCount method.
  5. Browser to the Counter tab and click the button to hit the breakpoint:

    Debug Counter

  6. Check out the value of the currentCount field in the locals window:

    View locals

  7. Hit F5 to continue execution.

While debugging your Blazor WebAssembly app you can also debug your server code:

  1. Set a breakpoint in the FetchData.razor page in OnInitializedAsync.
  2. Set a breakpoint in the WeatherForecastController in the Get action method.
  3. Browser to the Fetch Data tab to hit the first breakpoint in the FetchData component just before it issues an HTTP request to the server:

    Debug Fetch Data

  4. Hit F5 to continue execution and then hit the breakpoint on the server in the WeatherForecastController:

    Debug server

  5. Hit F5 again to let execution continue and see the weather forecast table rendered.

Visual Studio Code

To debug a Blazor WebAssembly app in Visual Studio Code:

  1. Install the C# extension and the JavaScript Debugger (Nightly) extension with the debug.javascript.usePreview setting set to true.


    JS preview debugger

  2. Open an existing Blazor WebAssembly app with debugging enabled.

    a. If you get the following notification that additional setup is required to enable debugging, recheck that you have the correct extensions installed and JavaScript preview debugging enabled and then reload the window:

    Additional setup requried

    b. A notification should offer to add required assets for building and debugging to the app. Select “Yes”.

    Add required assets

  3. Starting the app in the debugger is then a two-step process:

    a. Start the app first using the “.NET Core Launch (Blazor Standalone)” launch configuration.

    b. Then start the browser using the “.NET Core Debug Blazor Web Assembly in Chrome” launch configuration (requires Chrome). To use the latest stable release of Edge instead of Chrome, change the type of the launch configuration in .vscode/launch.json from pwa-chrome to pwa-msedge.

  4. Set a breakpoint in the IncrementCount method in the Counter component and then select the button to hit the breakpoint:

    Debug Counter in VS Code

Known limitations

There are a number of limitations with the current debugging experience in Visual Studio and Visual Studio Code. The following debugging features are not yet fully implemented:

  • Inspecting arrays
  • Hovering to inspect members
  • Step debugging into or out of managed code
  • Full support for inspecting value types
  • Breaking on unhandled exceptions
  • Hitting breakpoints during app startup
  • Debugging an app with a service worker

We expect to continue to improve the debugging experience in future releases. We appreciate your feedback to help us get the Blazor WebAssembly debugging experience right!

Auto-rebuild in Visual Studio

Visual Studio 2019 16.6 will watch for file changes in .cs and .razor files across the solution and automatically rebuild and restart the app so that the changes can be seen by simply refreshing the browser. This enables auto-rebuild support for ASP.NET Core hosted Blazor WebAssembly projects and Razor Class Libraries. Instead of manually rebuilding and restarting the app when making code changes, just edit, save, and then refresh the browser.

To use auto-rebuild, run the app using IIS Express and without the debugger attached (Ctrl-F5 instead of F5).

Auto-rebuild is not yet enabled for standalone Blazor WebAssembly projects. With standalone Blazor WebAssembly apps, you can instead edit files, rebuild the app, and then refresh the browser without restarting the web server.


Blazor WebAssembly apps now have built-in support for loading configuration data from appsettings.json and environment specific configuration data from appsettings.{environment}.json.

To add configuration data to your Blazor WebAssembly app:

  1. Add an appsettings.json file in the wwwroot folder of your Blazor WebAssembly app:
    "message": "Hello from config!"
  1. Inject an IConfiguration instance into your components to access the configuration data.
@page "/"
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration

<h1>Configuration example</h1>

  1. Run the app to see the configured message displayed on the home page.
  2. To optionally override this configuration with values specific to the Development environment, add an appsettings.Development.json to your wwwroot folder:
    "message": "Hello from Development config!"
  1. If you now run the app in Development, you’ll see the new message.

Note: Blazor WebAssembly apps load the configuration data by downloading the JSON files to the browser, so these configuration files must be publicly addressable. Do not store secrets in these configuration files, as they are public and can be viewed by anyone.

New HttpClient extension methods for JSON handling

The .NET team has been hard at work creating a full set of new extension methods for HttpClient that handle JSON serialization and deserialization using System.Text.Json. These extension methods are now available in preview with the System.Net.Http.Json package and they will replace the existing helper methods in the Microsoft.AspNetCore.Blazor.HttpClient package. We haven’t updated the Blazor WebAssembly template yet to use the new extension methods, but we will in our next Blazor WebAssembly preview update.

You can try the new extension methods yourself by replacing the Microsoft.AspNetCore.Blazor.HttpClient package with the newer System.Net.Http.Json package. Then add @using System.Net.Http.Json to your _Imports.razor file and update your code as follows:

Microsoft.AspNetCore.Blazor.HttpClient System.Net.Http.Json
GetJsonAsync GetFromJsonAsync
PostJsonAsync PostAsJsonAsync
PutJsonAsync PutAsJsonAsync

The updated implementation of the FetchData component in the default Blazor WebAssembly template looks like this:

@code {
    private WeatherForecast[] forecasts;

    protected override async Task OnInitializedAsync()
        forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecast");

System.Net.Http.Json also provides a JsonContent class that can be used for sending serialized JSON, as well as convenient helper methods for reading JSON from an HttpContent instance.

Look for more details on System.Net.Http.Json to be published soon on the .NET blog.

Known issues

There are a few known issues with this release that you may run into:

  • When building a Blazor WebAssembly app using an older .NET Core SDK you may see the following build error:
    error MSB4018: The "ResolveBlazorRuntimeDependencies" task failed unexpectedly.
    error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly '\BlazorApp1\obj\Debug\netstandard2.1\BlazorApp1.dll'. The system cannot find the file specified.
    error MSB4018: File name: '\BlazorApp1\obj\Debug\netstandard2.1\BlazorApp1.dll' 
    error MSB4018:    at System.Reflection.AssemblyName.nGetFileInformation(String s)
    error MSB4018:    at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
    error MSB4018:    at Microsoft.AspNetCore.Components.WebAssembly.Build.ResolveBlazorRuntimeDependencies.GetAssemblyName(String assemblyPath)
    error MSB4018:    at Microsoft.AspNetCore.Components.WebAssembly.Build.ResolveBlazorRuntimeDependencies.ResolveRuntimeDependenciesCore(String entryPoint, IEnumerable`1 applicationDependencies, IEnumerable`1 monoBclAssemblies)
    error MSB4018:    at Microsoft.AspNetCore.Components.WebAssembly.Build.ResolveBlazorRuntimeDependencies.Execute()
    error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

    To address this issue, update to version 3.1.201 or later of the .NET Core 3.1 SDK.

  • You may see the following warning when building from the command-line:
    CSC : warning CS8034: Unable to load Analyzer assembly C:\Users\user\.nuget\packages\microsoft.aspnetcore.components.analyzers\3.1.0\analyzers\dotnet\cs\Microsoft.AspNetCore.Components.Analyzers.dll : Assembly with same name is already loaded

    To address this issue, update to your package reference to Microsoft.AspNetCore.Components to 3.1.3 or newer. If your project reference the Microsoft.AspNetCore.Components package through a transitive package reference that has not been updated, you can add a reference in your project to resolve the issue in your project.

  • The following error may occur when publishing an ASP.NET Core hosted Blazor app with the .NET IL linker disabled:
    An assembly specified in the application dependencies manifest (BlazorApp1.Server.deps.json) was not found

    This error occurs when assemblies shared by the server and Blazor client project get removed during publish (see

    To workaround this issue, ensure that you publish with the .NET IL linker enabled. To publish with the linker enabled:

    • Publish using a Release build configuration: dotnet publish -c Release. The .NET IL linker is automatically run for Release builds, but not for Debug builds.
    • Don’t set BlazorWebAssemblyEnableLinking to false in your client project file.

    If you’re hitting issues running with the linker disabled, you may need to configure the linker to preserve code that is being called using reflection. See for details.


We hope you enjoy the new features in this preview release of Blazor WebAssembly! Please let us know what you think by filing issues on GitHub.

Thanks for trying out Blazor!


Comments are closed. Login to edit/delete your existing comments

  • Thys Nel 0

    Can you please add some information about selecting the appropriate Blazor WebAssembly configuration in different hosting environments. It is all fine to be able to have different app settings files for different configurations but in order to actually select the appropriate configuration it seems you need to set the “Blazor-Environment” response header to the required environment. I could not find any reference to this in the release notes or documentation and had to inspect the js to find this. Please document this in more detail, specifically if there is a way to actually set this in a publish profile for the case where IIS is used.

    • Matt Luccas Phaure Minet 0

      Seconded, I am having trouble getting my core hosted blazor wasm app to choose anything else than my appsettings.Production.json configuration.

      • Daniel RothMicrosoft employee 0

        Hi Thys, Matt. Thanks for the feedback! When your app is hosted in an ASP.NET Core app, Blazor adds a middleware that sets the Blazor-Environment header for you so that the app picks up the environment set on the server. The environment on the server is set using the ASPNETCORE_ENVIRONMENT environment variable (see For standalone Blazor WebAssembly apps, the dev server will add the header to specify the Development environment. For other hosting environments you’ll need to add the header yourself. I’ve opened to track getting this documented.

        • Thys Nel 0

          Thanks for the feedback. Our use case is as follows: Standalone WebAssembly app, published to iis. When we publish to IIS (using webdeploy) it generates a web config with all the rewrite rules etc. What we would like to do is use different publish profiles to set the correct environment. This can be done by setting the Blazor-Environment response header in the web config. However, we can’t get it to work:
          – Web config transforms do not seem to get processed with WebAssembly, so using that does not work; and
          – If we use different a specific provided web config with the correct header this gets overridden with the auto generated one.

          For hosting in other environments (we use nginx as well) it is not an issue because there we do the config once per environment and it keeps working since the publish process does not generate / override the website config.

          Either of the following will fix the issue:
          – Have an option to not deploy the web config (and manually configure it per site on the server). This is problematic since we normally deploy with “delete files on server not in source” option
          – Have an option to apply a web config transform to the generated web config (preferable)
          – Have an option to provide complete web config from project source without using the auto generated web config

          • Daniel RothMicrosoft employee 0

            Hi Thys. It looks like you’re correct that we’re overwriting the app’s web.config file on publish instead of honoring it. With ASP.NET Core projects we transform the web.config file if there is an existing one, but we don’t currently do that for standalone Blazor WebAssembly apps. Could you please file an issue on GitHub with this feedback?

  • Daniel G 0

    Hi Daniel, I don’t see currently any new versions of the nugets you described. The latest version is only 3.2.0-preview1.20073.1.

    • Wil Wilder Apaza Bustamante 0

      this comment has been deleted.

      • Daniel G 0

        Oh, thanks didn’t realised that.

  • dionisio luis 0

    Good Evening from Portugal.
    After I updated my project to this last version, i’m having this issue :
    blazor.webassembly.js:1 Uncaught SyntaxError: Invalid or unexpected token

    When I create new projects I dont have this issue.
    I’ve already changed a lot on my code and compared with a project that is working…
    Did any1 have this issue and have solved ?

    The application is a Client Side, Core Hosted


    • Daniel RothMicrosoft employee 0

      Hi Dionisio. It would be great if you could open a GitHub issue for this problem with a simplified version of the project that reproduces the issue:

    • Morgan Roff 0

      Dionisio, did you make any progress here? I just had this issue when I updated to 3.2.0 from 3.2.0-preview3.20168.3. I’m planning to file an issue once I can track this down a bit more, but currently everything works fine when I run locally from visual studio, but I hit this issue when I’m running from a docker image.

      Locally, I can see in dev tools that blazor.webassembly.js loads as valid javascript (eg.

      !function(e) {
          var t = {};
          function n(r) {
              if (t[r])

      ). However the docker image is serving garbage data. Looks like this:

      R�H�zZª�����'M��  �bj.�

      Could it be still gzipped maybe? The response headers have changed too. These headers have gone missing when I updated:

      content-encoding: gzip
      vary: Accept-Encoding
  • Lochy 0


    When trying to debug on a client project, I get stuck here.
    Not sure if I’m missing something, but it seems to detect there’s a breakpoint but can’t find it?

    // Unable to find document file:///...\Client\Pages\FetchData.razor
    • Daniel RothMicrosoft employee 0

      Hi Lochy. Are you trying to debug in Visual Studio, Visual Studio Code, or in the browser?

      • Lochy 0

        Hi Daniel,

        This is in Visual Studio 2019/preview.
        What seems to happen is if I step through a few times, it takes me to the server side code, but gives me that error for any client side stuff.
        I also haven’t gotten the autobuild to work via preview either, but I’m not hugely bothered by that at the moment.
        I also had 3 GSOD for http.sys the other day after pressing the debug button.

        Let me know what information I can provide that would help.

        • Daniel RothMicrosoft employee 0

          Hi Lochy. For your debugging issues, it would be best if you could open an issue with more details about your setup, like your specific VS version, the build configuration, what your project looks like, etc. For Blazor WebAssembly debugging issues I recommend opening the issue in the repo.

          Autorebuild only works in a fairly constrained scenario currently. You need to run without debugging (Ctrl-F5, not F5), and you need to run on IIS. Also, standalone Blazor WebAssembly projects are not supported – Blazor WebAssembly projects need to be ASP.NET Core hosted for the feature to work.

          • Lochy 0

            Hi Daniel,

            Can you confirm if I submit to that repo for the http.sys GSOD issues as well, or might that be more vscode or .net related?

  • David Bowser 0

    Has something changed with two-way binding recently?
    I have a page that contains a dozen or so components. I had two way binding working powerfully so that when a user selected one row in one component that was getting reflected back to the main component and back out to the sub component with the detail. This is repeated for quite a few levels of drill down with some branching logic and all. Now I decided to upgrade to the latest and all of my bindings in my containing page have errors and nothing I try is working
    In the main page I have something like:

    <Table2C @bind-SelectedTable2RowObject=”SelectedTable2RowObject” @bind-SelectedTable3RowObject=”SelectedTable3RowObject” />

    private Table2Row SelectedTable2RowObject;
    private Table3Row SelectedTable3RowObject;

    In the Table2C.razor file for the above component I have

    public Table2Row SelectedTable2RowObject …

    public Table3Row SelectedTable3RowObject …

    That all worked great before but now I get the red squiggly under each local variable listed between quotes such as “SelectedTable2RowObject”.
    It says: ‘The attribute names could not be inferred from bind attribute ‘SelectedTable2RowObject’.
    I have tried many variations but nothing seems to work.

    Further, my one way bindings of the form ‘ ParamterName=”Value” ‘also fail with an error:
    Found markup element with unexpected name ‘ComponentName’. If this is intended to be a component, add a using directive for its namespace.
    I don’t know what the namespace would be since the component is just a .razor file with no explicit namespace or class definitions.

    In general things seem to be getting a bit confusing. When I tried to look up documentation on bindings in case there is some new form documented I see all kinds of different approaches, some for example with snippits showing a class deriving from BlazorComponent, some with .cshtml files, but nothing clearly stating that I now need to somehow derive a class from some standard base class, or if the file extensions should be changed or how all of this should work or when to do different approaches. I built a powerful app and have continued to move it forward through quite a few change cycles on this amazing technology but now things seem to be getting more confusing instead of more clear.

    Can you please give some direction for my specific issue and update the documentation to clarify high level issues such as what file extension we should use for pages and components as well as details such as the various ways to pass parameters to components and what we should use when with examples. I realize things are still changing but I thought it was supposed to be getting more stable soon.

    Thanks so much !!!

    • Daniel RothMicrosoft employee 0

      Hi David. To help me better understand what the current state of your code base is, which version of Blazor are you upgrading from?

      You’re binding code looks correct to me. Do you see the same errors if you build from the command-line? Can you confirm your component parameters have public getters and setters?

      Components do have a namespace, which is derived from the path to the .razor file, or it can be specified explicitly using the @namespace directive. When you define a component in a .razor file, it gets compiled into a normal C# class. To use a component, its namespace needs to be in scope, just like it would in C#. You can either fully qualify the component name in the tag (<Namespace.ComponentName>) or you can add an @using directive for the namespace.

      If you’re still having a lot of issues it will probably be easier to get help by opening a GitHub issue with more details about your project as this commenting system is a bit limited.

      • David Bowser 0

        Hello Daniel,

        Thank you for your help!
        I finally figured out my issue!
        I needed to add a @using with the path of the component folder and then everything cleared up.

        Thank you so much!!! So glad this binding approach still works. It is really powerful.

        It still would be really helpful to have some more documentation about all this and what to use when. I know you have lots of requests to add new functionality but documentation, recommended approaches, and examples are really important for those just getting started. These are strengths of .NET and why I and probably others prefer programming in C# vs JavaScript. 🙂

  • haroon siddiqi 0

    Hi Daniel,

    Need a helping hand as I am getting back to hands on dev after a while.

    I created a VM on Azure with VS2019 Community Edition (16.5.2) to try creating a static website on azure with blazor SPA. I tried getting started tutorial but could not find blazor web assembly template. I then found out that it is only available in preview so I installed VS2019 16.6.0 preview 2.1. Here is detail of what is already installed from about box:
    Microsoft Visual Studio Community 2019 Preview
    Version 16.6.0 Preview 2.1
    Microsoft .NET Framework
    Version 4.7.03190
    ASP.NET and Web Tools 2019 16.6.741.31162
    ASP.NET and Web Tools 2019
    ASP.NET Core Razor Language Services
    Provides languages services for ASP.NET Core Razor.
    ASP.NET Web Frameworks and Tools 2019 16.6.741.31162
    For additional information, visit

    Blazor web assembly template is still not available. any help to get me started would be much appreciated.

    Hope to hear from you soon.

    • haroon siddiqi 0

      Although everyone is saying “dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview3.20168.3” is not for visual studio but it actually solved my problem and now I can see the webassembly option.

      • Wil Wilder Apaza Bustamante 0

        this comment has been deleted.

      • Daniel RothMicrosoft employee 0

        Hi Haroon. I’m glad you were able to workaround your issue. The Blazor WebAssembly should be installed when you install Visual Studio 2019 16.6 Preview 2. If you drop to the command-line and enter dotnet --version what SDK version gets returned?

  • Osman Taskiran 0

    Hi Daniel,

    Thank you for preview 3.

    I am trying to publish Blazor WebAssembly Hosted with Individual Authentication.
    I dont have any change on template.

    This template works on developer machine and Azure Windows AppService well.
    Also this template works on Azure Linux App Service, but it can not validate token on linux app service.
    I can not browse fetchdata api. It returns 401 error.

    I have look at your pizza app, but the authentication and authorization mechanism a little bit diffrent than latest template.
    I am searching a sample project about identity server and blazor webassembly hosted with individual authentication. But I can not find any sample.

    Could you please provide a sample project that runs on a production environment on linux app service.
    There are some complicated subject. Azure Key Vault, certificates, keys, Identity Server (also external providers) etc. This may be help to everbody.


    • Daniel RothMicrosoft employee 0

      Hi Osman. Thanks for this suggestion! I suspect on Linux that there is some issue with the signing certificate. It would be interesting for us to see how you’ve so far tried to set that up. Could you please file an issue on GitHub with more details on the issue you’re seeing and with this request for docs on this topic? This will help us ensure that this feedback is appropriately tracked.

    • Daniel RothMicrosoft employee 0

      Hi Shahid. Blazor WebAssembly apps run on a WebAssembly based .NET runtime that runs fine on all modern browsers regardless of platform including mobile and desktop platforms. So your Blazor WebAssembly app should run fine on Android. The runtime used by Blazor WebAssembly is separate from the .NET Core runtime, so that’s why you don’t see Android listed for .NET Core. We understand it can be confusing to keep track of all the various .NET implementations, so for .NET 5 were doing work to combine .NET Core and the Mono based runtime used for Xamarin apps into a more unified platform:

  • بهادر برادران 0

    hi Daniel
    please create sample project with blazor (Server or webassembly ) that show report *.rdl or *.rdlc
    thank you.

Feedback usabilla icon