ā Error when including a project reference in a Blazor WASM project
I'm getting an error
There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.
only when including a ProjectReference
to another project in my solution in a Blazor WASM project. Both projects are targeting net7.0
. Do I have to do something special to get the project reference to work properly with WASM or something?12 Replies
Did you miss an installer workload maybe? Complete guess...
installer workload?
The entire csproj is this
Things you select in the installer
What installer?
Studio
Visual Studio?
Well, I'm primarily using Rider, but I'm getting that error even when using
dotnet build
It looks like a missing runtime
Hmm, odd since it works when I don't have the project reference
I have the
Microsoft.AspNetCore.App 7.0.2
runtime installed, although perhaps I do need the WASM runtime?Asp project might just not be compatible with blazor runtime.
There are some stack overflow threads on it. Didn't try to hard to understand š
Well... I added
<UseBlazorWebAssembly>true</UseBlazorWebAssembly>
and changed the SDK to Microsoft.NET.Sdk.Web
instead of Microsoft.NET.Sdk.BlazorWebAssembly
now it builds
ĀÆ\_(ć)_/ĀÆ
Except now the website just gets stuck at loading with a warning that it failed to load _framework/blazor.webassembly.js
So the issue is probably that the other project is not compatible with Blazor WASM, right?
How would I make it compatible?š¤·āāļø
my knowledge expired already. Have you gone through this?
https://stackoverflow.com/questions/63993294/there-was-no-runtime-pack-for-microsoft-aspnetcore-app-available-for-the-specifi
Stack Overflow
There was no runtime pack for Microsoft.AspNetCore.App available fo...
Trying to migrate from ASP.NET Core 3.1 to 5.0 using this guide provided by Microsoft.
Installed SDK 5.0.100-rc.1 with runtimes. Updated project as guide says and still getting following error:
The...
yes
Problem solved, issue was that the project has a reference to
Microsoft.AspNetCore.App
which caused it to not work.