How to add razor pages to razor class library and reference from Blazor server project?
I am trying to place all my razor pages and components inside a razor class library to modularize the code to pack as a nuget package. I can get the components rendered but routing to pages just wont work.
I have added the assembly to be scanned in the blazor web project as such and referenced the project in the csproj file:
`
3 Replies
Do you have any suggestions what else to try out?
https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/routing?view=aspnetcore-9.0#static-routing
could try adding this as well
ASP.NET Core Blazor routing and navigation
Learn how to manage Blazor app request routing and how to use the Navigation Manager and NavLink component for navigation.
i read that and did the requirements but it wont work still 😦
finally it wortks !