I wanted to implement Prerendering with my Blazor WASM hosted application, but the application doesn't leave the "prerendering" mode. At least the method "onafterrender" doesn't get called in any component. In addition none of my javascript functions / scripts are working.
Ive followed the instructions on
- https://learn.microsoft.com/de-de/aspnet/core/blazor/components/prerendering-and-integration?view=aspnetcore-7.0&pivots=webassembly and
- https://andrewlock.net/enabling-prerendering-for-blazor-webassembly-apps/
Ive tried to play around with the order and removing of script in the cshtml file as well as in the programm.cs but nothing worked
I followed the Prerendering Configuration. I don't see any issue. I'm able to call the javascript method on Index.razor -> OnAfterRenderAsync()
_Host.cshtml:
Index.razor:
Screenshot:
Sample GitHUb project created. Please check the link.