As per the migration document here it recommends to add this property PreferExactMatches
When I do I get this error
InvalidOperationException: Object of type 'Microsoft.AspNetCore.Components.Routing.Router' does not have a property matching the name 'PreferExactMatches'.
Even the API explorer says the property isn't there. Am I missing anything in here? Please suggest. For now I am skipping it and its working.
The Router component is used in the App component of Blazor apps. When a Razor component ( .razor) with an @page directive is compiled, the generated component class is provided a RouteAttribute specifying the component's route template.
Blazor Server is integrated into ASP.NET Core Endpoint Routing. An ASP.NET Core app is configured to accept incoming connections for interactive components with MapBlazorHub in Program.cs: The typical configuration is to route all requests to a Razor page, which acts as the host for the server-side part of the Blazor Server app.
Otherwise, the failing code results in an unhandled exception that's fatal to a Blazor Server circuit. By default, calls to InvokeAsync must complete within a certain period or else the call times out. The default timeout period is one minute.
This article describes how Blazor manages unhandled exceptions and how to develop apps that detect and handle errors. When a Blazor app isn't functioning properly during development, receiving detailed error information from the app assists in troubleshooting and fixing the issue.
The MS migration document was in front of the patch release. (The document is edited in the meantime). The property PreferExactMatches is not yet released, but will be next days.
https://github.com/dotnet/AspNetCore.Docs/issues/20838
I believe the "PreferExactMatches" is something to do with 5.0.1 sdk patch.
SDK : https://dotnet.microsoft.com/download/visual-studio-sdks
blog post : https://learn.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-5.0&tabs=visual-studio
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With