API Versioning with .NET 7

300 Views Asked by At

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.

1

There are 1 best solutions below

1
On BEST ANSWER

I resolved it by using Asp.Versioning.Mvc.