Description
Problem
ValidationProblemDetails
& ProblemDetails
are classes introduced in ASP.NET Core 2.1 as a part of Microsoft.AspNetCore.Mvc.Core
(https://www.fuget.org/packages/Microsoft.AspNetCore.Mvc.Core). In typical scenario, Web API developer has a special project "Contracts" with various classes (API models) which are used for (de)serialization from/to api. The same contracts can be used on the client side (for example in SDK). It is typical that the part of the contracts are the problem details classes (described in RFC 7807).
The Problem is when I want to include this contracts into my SDK project or contract project, I must reference Microsoft.AspNetCore.Mvc.Core which has many unrelated references.
Solution
Classes reflecting some RFCs can have another NuGet package which can be a part of Microsoft.AspNetCore.Mvc.Core.
Additional context
Current workaround is to create another classes with the same properties. Of course this is not so clean way with unnecessary duplicity.