There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'

I finally made it work.

I did everything that guide said, except for the project file which I changed to this:

<Project Sdk="Microsoft.NET.Sdk.Web">


But I have no idea if it is correct when official upgrade guide says to use:

<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

instead of:

<Project Sdk="Microsoft.NET.Sdk.Web">

Had the same issue and finally got it working. Here's how.

In my case, the error wasn't the result of the Blazor project itself, but a referenced project in the same solution. The referenced project targets .net standard 2.1, which should be fine in itself; however, it also had some NuGet packages installed which might conflict with Blazor dependencies: (Microsoft.Extensions.*).

- Project A (.net standard 2.1 - Class library)
  - Dependencies
    - Packages
      - Microsoft.Extensions.Configuration.Json (<-- example dependency)
- Project B (.net 5 - Blazor webassembly)
  - Dependencies
    - Projects
      - Project A (<-- caused the error, presumably because of the above dependency)

The blog post about .net 5 rc mentions all Microsoft.Extensions.* packages in a Blazor project should be updated to 5.0.0-rc.1.*.

Was able to resolve the issue by removing the project dependency (which I didn't need in the first place, but accidentally got placed there).

What I don't understand is why a 'dotnet build' doesn't give an understandable error message about a conflict instead of this vague message about the runtime identifier mentioning the Blazor project.

Hope this will help others as well.

I faced the same issue and asked Microsoft about that under this post:

You need to update your projects to use below SDK's;

Client - Microsoft.NET.Sdk.BlazorWebAssembly
Server - Microsoft.NET.Sdk.Web
Shared - Microsoft.NET.Sdk