MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.37k stars 332 forks source link

Add .net 7.0 TFM to all projects (except benchmark) #496

Closed cedwards-telis closed 1 year ago

cedwards-telis commented 1 year ago

Do so whilst maintaining the .net 6 TFM using multitargeting thus allowing project to be used by .net6 and .net 7 users and making tests run in both .net 6 and .net 7.

This fixes https://github.com/MapsterMapper/Mapster/issues/475.

It is similar to the PR here https://github.com/MapsterMapper/Mapster/pull/489 which only targets .net 7.

Also fix AddProblemDetails in sample project to use third party extension in .net 6 and built in service in .net 7 (doing this avoids naming collision because the third party library in use and the built in feature in .net 7 both use services.AddProblemDetails() ).

https://andrewlock.net/handling-web-api-exceptions-with-problemdetails-middleware/

oscarjaergren commented 1 year ago

Do we have any release plans for .net 7.0?

qutayba commented 1 year ago

Is there any plans for merging and releasing this PR?

mnj commented 1 year ago

Would also like to know if there are any plans to release a new version with 7.0 support the changes in this PR should resolve it, it's really annoying to have to switch the project version to 6.0 to run the codegen for mapster, then switch back to 7.0 for the actual application all the time :)

mnj commented 1 year ago

@andrerav is there any chance, we can get a new release with this PR?, it's really painful to use with .NET 7 as is :)

andrerav commented 1 year ago

@mnj I will get you a pre-release package this week if everything goes to plan. Thank you for being so patient :)

andrerav commented 1 year ago

Pre-release packages targeting .NET 7 should be available in a few minutes on NuGet :) Thank you @cedwards-telis!

bgaprogrammer commented 1 year ago

@cedwards-telis @andrerav When will be released the next stable version (7.4.0)?

jeroenhabets commented 1 year ago

@cedwards-telis @andrerav I have the same question: when do you plan to release 7.4.0 (the next stable version)? Are there any show-stoppers?

(We are preparing a .Net8 upgrade and can only embrace this library if it is actively maintained / updates regularly released)

andrerav commented 1 year ago

@bgaprogrammer and @jeroenhabets Apologies for the delays! What can I say, it's been a busy summer :) 7.4.0 has been released now, and I've opened a pull request that adds support for .NET 8 in #631. Thank you for the nudge :)