Open lonix1 opened 1 year ago
I've found at least one problem so far, this used to work:
services.AddProblemDetails().AddProblemDetailsConventions();
But now that gives:
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)' [MyProject]csharp(CS0121)
Workaround:
Hellang.Middleware.ProblemDetails.ProblemDetailsExtensions
.AddProblemDetails(services)
.AddProblemDetailsConventions();
I am seeing the same problem. @khellang can you comment on if we need both? Or yours calls the new one? Or yours overrides the new one?
As mentioned elsewhere you can do this to resolve the issue:
using ProblemDetailsOptions = Hellang.Middleware.ProblemDetails.ProblemDetailsOptions;
This lets the normal syntax work:
builder.Services.AddProblemDetails(options =>
ASP.NET Core v7 has some changes that deal with problem details.
Does anyone know how that impacts the middleware in this library, if at all?
(Is there any overlap now? If you've already upgraded to v7, would you mind advising me whether any changes were necessary, and whether you still use this library, etc.?)