Blazor server, additional assemblies for Router component does not respect @page declaration

Viewed 457

I have multiple assemblies that contain my razor pages. I followed the documentation, so I have specified the array of these assemblies in the Router component.

The problem is that the pages in my assemblies seem to all have the route '/'.

InvalidOperationException: the following routes are ambigous:
'/' in 'OtherComponents.Pages.ConfigPage'
'/' in 'MyApp.Pages.Index'

ConfigPage.razor in OtherComponents.dll assembly

@page "/config"
@inherits ConfigPageBase

<h1>Configuration Page</h1>

Index.razor in MyApp assembly

@page "/"

<h1>IndexPage</h1>

If I change the route of page Index.razor (to '/index' for example), then the '/' route load correctly the ConfigPage.razor. I suppose the pages are correctly loaded from additional assemblies but without respect the @page definition.

0 Answers
Related