MapsterMapper / Mapster

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

Make the project compile and pass tests under net6.0 #397

Closed Philippe-Laval closed 2 years ago

Philippe-Laval commented 2 years ago

Hi all,

I managed to have the Maspter project compile under net6.0 and pass all the unit tests. I had to add some #if NET6_0_OR_GREATER in the source code.

I created also a project "TemplateTest" to show how to generate code (the T4 templates in the project "Benchmark" are not working, so I had to comment some unit tests for now and take the code of T4 template to the unit tests).

I guess, we could

andrerav commented 2 years ago

Hi @Philippe-Laval, I am trying to understand why the unit tests failed after you changed the framework to net6.0. Did they fail immediately, or after you upgraded the NuGet packages? I made the same changes as you, but I have not had any unit tests fail so far. I have however not done any NuGet package upgrades yet.