-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
Trying to experiment with .Net 7 and I get this error when building it
Program.cs(76, 18): [CS0121] The call is ambiguous between the following methods or properties: 'Microsoft.Extensions.DependencyInjection.ProblemDetailsServiceCollectionExtensions.AddProblemDetails(Microsoft.Extensions.DependencyInjection.IServiceCollection)' and 'Hellang.Middleware.ProblemDetails.ProblemDetailsExtensions.AddProblemDetails(Microsoft.Extensions.DependencyInjection.IServiceCollection)'
I added it to my builder services like this:
builder.Services.AddProblemDetails();
Workes fine on .Net 6
This is a conflict with the newly introduced AddProblemDetails in Microsoft.Extensions.DependencyInjection.ProblemDetailsServiceCollectionExtensions.AddProblemDetails
More info on their blog https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-7-preview-7/#new-problem-details-service
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels