Reputation: 301
I want to create a Blazor server app and MAUI app both sharing same UI. I have done the following
_Imports.razor
fileNow MAUI app shows the weather page without any issue. Server App on the other hand generated 404 error. Not able to get this work.
Components work fine but when it comes to pages it's not working in server app. I have uploaded to https://github.com/udayakumarlm/CommonUI.
Any suggestions ?
Upvotes: 1
Views: 475
Reputation: 30001
You've set up the Router to see the library assembly, but Weather
is a static SSR (static server-side rendering) page, not an Interactive page.
You need to add the additional assembly to the Razor middleware handler so it can see it.
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddAdditionalAssemblies(new[] { typeof(RazorClassLibrary1.TestClass).Assembly });
Upvotes: 2