I have migrated a .NET Core 2.1 application to .NET 7, I had API Versioning on that with Microsoft.AspNetCore.Mvc.Versioning 2.3.0.
In the upgraded version the versioning does not work anymore, I get the following error:
Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException: The request matched multiple endpoints
I tried updating Microsoft.AspNetCore.Mvc.Versioning to 5.1.0 (which is deprecated) but that does not help.
I resolved it by using Asp.Versioning.Mvc.