Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ozanyasindogan opened this issue Nov 11, 2020 · 12 comments
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@ozanyasindogan
Copy link

ozanyasindogan commented Nov 11, 2020

Hello,

When I migrated my Asp.net Core 3.1 Hosted Blazor Webassembly Project to .Net 5 (Client, Server, Shared)
I started to get at Server project below error message:

There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.
and directs me there:
`

ResolveRuntimePackAssets

Resolve assets from runtime packs.

-->


`

When I bring back Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"
to Project Sdk="Microsoft.NET.Sdk.Web" in Server project file it seems
to compile successfully but the client does not render properly.

Why this is happening?

Same issue was addressed in StockExchange:
https://stackoverflow.com/questions/63993294/there-was-no-runtime-pack-for-microsoft-aspnetcore-app-available-for-the-specifi

but I don't see them having a fitting solution for me.

Thanks,

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Exceptions (if any)

Further technical details

  • ASP.NET Core version .Net 5.0
  • Include the output of dotnet --info
    dotnet info.txt
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and it's version
    Visual Studio 2019 16.8
@Pilchie Pilchie added the area-blazor Includes: Blazor, Razor Components label Nov 11, 2020
@pranavkm
Copy link
Contributor

@ozanyasindogan could you verify this is what your projects' SDKs look like:

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

@guardrex looking at the SO responses, there might be some confusion about what projects need the SDK to be updated. Do we need to tweak our migration guides to make this clearer: https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-3.1&tabs=visual-studio#update-blazor-webassembly-projects?

@guardrex
Copy link
Contributor

Sure ... I'll do that.

@guardrex
Copy link
Contributor

We already have the coverage, but I'll add strategic NOTEs to it to try and head off these problems.

@ghost
Copy link

ghost commented Nov 13, 2020

Same issue! Please don't close it without a reason

@guardrex
Copy link
Contributor

@Sm1le291 ... The docs have already been updated and are live.

@ozanyasindogan
Copy link
Author

@ozanyasindogan could you verify this is what your projects' SDKs look like:

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

@guardrex looking at the SO responses, there might be some confusion about what projects need the SDK to be updated. Do we need to tweak our migration guides to make this clearer: https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-3.1&tabs=visual-studio#update-blazor-webassembly-projects?

That makes sense and works fine now, what does not make sense was this phrase in the documentation:

For a Blazor WebAssembly project, including the Client project of a hosted Blazor solution, apply the following changes to the project file:
Update the SDK from Microsoft.NET.Sdk.Web to Microsoft.NET.Sdk.BlazorWebAssembly:

Including the Client sounds like as if we needed to change Server / Shared projects including the Client project
to use Microsoft.NET.Sdk.BlazorWebAssembly. Changing this part and making it more precise should solve the confusion I think.

Thank you for your swift reply.

@alexyakunin
Copy link

Have the same issue.

@alexyakunin
Copy link

And no, prev. answer doesn't help.

@ghost
Copy link

ghost commented Nov 16, 2020

And no, prev. answer doesn't help.

Hi Alex! I just recreate all projects are based on new template and made copy/paste and after that everything worked. Easier to do so then wait an answer from microsoft)))

@guardrex
Copy link
Contributor

Yes, @Sm1le291 ... I was just about to suggest that .......

@alexanderkyte ... An approach that would help us sort out if there's a missing migration item (or items) is for you to create a new hosted solution from the 5.0 template (you can follow the 5.0 version of the WASM security topic) and then compare SxS file-by-file to your current solution looking for difference(s). I've been working on updating the migration guidance. There were about four docs PRs 😅 for release (some before, some after), and I thought that we had everything at this point, but there were many changes. It's possible that there's still something missing. Alternatively if you don't want to so a SxS comparison yourself, you could strip out the sensitive bits of your app and put it up on GH. I'll go through your app and compare to one of my test apps to see if I can 👁️ the difference.

@gonsalvg
Copy link

Same issue... tried to migrate my hosted-wasm project from netstandard2.1 on the client and netcore3.1 on the server as that was the older template.

@pranavkm
Copy link
Contributor

Hi, it's not helpful to comment on a closed issue as it is very easy for us to miss these notifications. If you're having issues migrating what would help is to file a new issue, include the contents of your app's project files, and any errors you see during the build when you update the app. Thanks!

@dotnet dotnet locked as resolved and limited conversation to collaborators Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

6 participants