-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.This issue needs the attention of a contributor, typically because the OP has provided an update.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsquestion
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
After modifying App.razor to use InteractiveWebAssemblyRenderMode on HeadOutlet and Routes, a published Blazor WebAssembly app (built with dotnet publish) fails at runtime with a Mono assertion:
[MONO] * Assertion at /__w/1/s/src/runtime/src/mono/mono/metadata/assembly.c:2718, condition `<disabled>' not met
Expected Behavior
The published WebAssembly app runs normally in the browser.
Steps To Reproduce
- Create a new Blazor WebAssembly app:
dotnet new blazor --interactivity WebAssembly --all-interactive --no-https
- Edit
BlazorBug/Components/App.razorand change theHeadOutletandRouteslines to:
<HeadOutlet @rendermode="new InteractiveWebAssemblyRenderMode(prerender: false)" />
...
<Routes @rendermode="new InteractiveWebAssemblyRenderMode(prerender: false)" />
- Publish the app:
dotnet publish -c Release
- Open the published app in a browser and check the developer console.
Exceptions (if any)
The browser console shows a Mono runtime assertion and the app fails to run. Example message:
dotnet.runtime.fn94ls2wwa.js:3 [MONO] * Assertion at /__w/1/s/src/runtime/src/mono/mono/metadata/assembly.c:2718, condition `<disabled>' not met
.NET Version
.NET SDK: 10.0.100-rc.2.25502.107 or .NET SDK: 9.0.306
Anything else?
- OS: Windows 11
Example project
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.This issue needs the attention of a contributor, typically because the OP has provided an update.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsquestion