I'm using nswag to generate C# Client code and i had to include all the Microsoft.AspNetCore.Mvc stuff with all its dependencies. One Client is a PowerShell module.
I copied the source code of https://github.com/aspnet/AspNetCore/blob/master/src/Mvc/Mvc.Core/src/ProblemDetails.cs and change the namespace.
If ProblemDetails lives in a an NetStandard Assembly I can share this with my (.Net-Core and .Net-Framework) Clients.
Copying the code seems fine. I's 57 lines of code and most of them are comments. I'm not sure it makes sense to make another assembly just to put this type in it.
Although I agree it's easy to just write/copy the code, I'd also like to see this outside (on a lower level than) MVC.
Just adding my vote 馃憤
Bottom line: ProblemDetails is such a crappy implementation of a good idea. Even the documentation on it basically says "beware, this might not behave the way you hope":
The round-tripping behavior for Extensions is determined by the implementation of the Input Output formatters. In particular, complex types or collection types may not round-trip to the original type when using the built-in JSON or XML formatters.
This is a solution to https://github.com/aspnet/AspNetCore/issues/6202
@pranavkm
Nothing planned here - closing.
Most helpful comment
Although I agree it's easy to just write/copy the code, I'd also like to see this outside (on a lower level than) MVC.
Just adding my vote 馃憤