I'm getting the following error for my solution and I do a clean and build.
There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.
I've created a private repo on github and invited 'maliming' as a collaborator to it.
4 Answer(s)
-
0
The error "There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'" typically occurs when trying to use server-side or ASP.NET Core-specific packages in a Blazor WebAssembly (WASM) project. Blazor WASM runs on the client and does not support the full ASP.NET Core runtime, so references to Microsoft.AspNetCore.App or similar server-side packages should be avoided in the WASM project.
To resolve this:
- Ensure that your Blazor WASM project does not reference server-only packages like Microsoft.AspNetCore.App. Only the server (Host) project should reference these.
- If you are using a hosted Blazor solution (Blazor WASM + HttpApi.Host), make sure the WASM project only references client-compatible packages.
- Clean the solution and delete the bin and obj folders in all projects.
- Rebuild the solution.
If you are using a custom RuntimeIdentifier or have edited the project file, ensure that the Blazor WASM project targets
net8.0
(or the correct .NET version) and does not set a RuntimeIdentifier likebrowser-wasm
unless required by the template.For a correct setup, see the official ABP Blazor WASM + ASP.NET Core Hosted integration steps:
- Add the Blazor project reference and
Microsoft.AspNetCore.Components.WebAssembly.Server
package only to the Host project. - Use
app.UseBlazorFrameworkFiles()
andapp.UseStaticFiles()
in the Host'sOnApplicationInitialization
. - Do not add server-only dependencies to the WASM project.
- Add the Blazor project reference and
If you have a private repo and have invited a collaborator, you can continue troubleshooting with them, but the above steps should resolve the runtime pack error.
Sources:
- https://abp.io/community/articles/zbjvgrc9
- https://abp.io/docs/latest/tutorials/todo/single-layer/
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
I've tried everything suggested and still get the error. I've shared the repo where this issue can be seen. Make sure you're using the ABP_Issue branch.
-
0
hi Spospisil
I have reproduced your problem. I will provide a solution soon.
Thanks.
-
0
hi
The
CFData.Structure.Core
is usedSdk="Microsoft.NET.Sdk.Web"
as SDK.It can not be used in a WASM project.
Can you try to remove this project from your
CFData.Structure.Tenant.Licensing
project?Or change
CFData.Structure.Core
to usingSdk="Microsoft.NET.Sdk"
Thanks.