Skip to content

move Microsoft.AspNetCore.Mvc.ProblemDetails to an ....Abstract Assembly #7679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
FlorianGrimm opened this issue Feb 18, 2019 · 5 comments
Closed
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Comments

@FlorianGrimm
Copy link

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.

not so nice Solution

I copied the source code of https://github.com/aspnet/AspNetCore/blob/master/src/Mvc/Mvc.Core/src/ProblemDetails.cs and change the namespace.

Describe alternatives you've considered

If ProblemDetails lives in a an NetStandard Assembly I can share this with my (.Net-Core and .Net-Framework) Clients.

@davidfowl
Copy link
Member

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.

@khellang
Copy link
Member

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 👍

@Eilon Eilon added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Feb 19, 2019
@jzabroski
Copy link
Contributor

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.

@jzabroski
Copy link
Contributor

This is a solution to #6202
@pranavkm

@danroth27
Copy link
Member

Nothing planned here - closing.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

No branches or pull requests

6 participants