proudmonkey / AutoWrapper

A simple, yet customizable global exception handler and Http response wrapper for ASP.NET Core APIs.
MIT License
679 stars 82 forks source link

.NET 5.0 support #86

Open mattmckinstry opened 3 years ago

mattmckinstry commented 3 years ago

Is it possible to release a version with .NET 5.0 support?

proudmonkey commented 3 years ago

Yes. The plan is also to migrate or atleast support System.Text.Json. Been busy at work these days but will work on it when time permits. It's on my priority list :)

proudmonkey commented 3 years ago

Updates - The .NET 5 migration is currently still on-hold because my son was admitted in the hospital. I'll resume the migration hopefully next week when everything is okay. You can see the work I've started here: https://github.com/proudmonkey/AutoWrapper/tree/v5-beta

Thanks, Vince

mattmckinstry commented 3 years ago

Hope your son gets well soon

sajidali2444 commented 3 years ago

Hope your son gets well soon. praying for your son.

On Wed, Mar 24, 2021 at 10:20 PM Matt McKinstry @.***> wrote:

Hope your son gets well soon

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/proudmonkey/AutoWrapper/issues/86#issuecomment-806011313, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHKQ3HLW7RGPI6KULN6WG3TFINOBANCNFSM4UCQBDEA .

-- Best Regard: Sajid Ali Software Engineer (+92) 333 6528504 / 321 786 5510

PBonvang commented 3 years ago

Hi :) Hope your son is doing better.

Do you have an estimate of when support for 5 will be released? I'm in the situation that I need to hand the project in at the end of the month, if you won't have the time, it's totally understandable just wish to know before it's to late to work around it.

Best regards and wishes Peter

gokmensercan commented 3 years ago

Any news about the improvements? @proudmonkey

zoinkydoink commented 3 years ago

https://www.nuget.org/packages/AutoWrapper.Core.Net5/4.5.1

@proudmonkey seems someone added support for .NET5, if you can extend this to include .NET6, that would be great

mattmckinstry commented 3 years ago

https://www.nuget.org/packages/AutoWrapper.Core.Net5/4.5.1

@proudmonkey seems someone added support for .NET5, if you can extend this to include .NET6, that would be great

That was me. Its just a fork with some added target framework xml. We couldnt wait any longer on the official implementation as it was holding up our move to .Net 5

proudmonkey commented 3 years ago

All - I've released an RC version just to test out the migration to .NET 5. Alot of code refactoring has been done for v5 and there are breaking changes. I would really appreciate if you could test it out as well: https://www.nuget.org/packages/AutoWrapper.Core/5.0.0-rc

Please provide feedback if there are any issues you encountered. Thank you!

Breaking changes

ReferenceLoopHandling and DefaultContractResolver aren't still supported in .NET 5 that's why handling reference loop and ApiResponse property mappings will not be supported when targetting .NET 5. .NET Core 3.1 will still use Newtonsoft.Json and it's only supported by AutoWrapper <= v4.5.0

mattmckinstry commented 3 years ago

Had a quick play.

ApiRequestHandler.HandleSuccessfulRequestAsync does not work when returning a collection.

Think it needs the following change

if (root.ValueKind == JsonValueKind.Object || root.ValueKind == JsonValueKind.Array)

proudmonkey commented 3 years ago

Thank you! PR for this fix has been submitted. I've found other issues as well and will release a new rc version within the week for us to test it out again :)

proudmonkey commented 3 years ago

New rc version has been released: https://www.nuget.org/packages/AutoWrapper.Core/5.0.0-rc-02

mattmckinstry commented 3 years ago

Handling of ApiProblemDetailsException seems to be broken

Doing the following produces a 500 Internal Server error now throw new ApiProblemDetailsException($"Record with id: {id} does not exist.", Status404NotFound);

proudmonkey commented 3 years ago

@mattmckinstry - thank you for the feedback. I'll look into this.

proudmonkey commented 3 years ago

@mattmckinstry This should now be fixed in rc-03: https://www.nuget.org/packages/AutoWrapper.Core/5.0.0-rc-03

Please keep you feedback coming to better improve this project. Thank you and I appreciate all the support and feedback! ❤️

replete commented 2 years ago

Shame this doesn't work with .NET 6, looks like a great library.

proudmonkey commented 2 years ago

@replete - Not yet :)

binaryplates commented 1 year ago

@proudmonkey any news regarding .NET 6?