Skip to content
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

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

Merged
merged 3 commits into from
Sep 5, 2022

Conversation

Philippe-Laval
Copy link
Contributor

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

@@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not the only changes in the pull request.
Search the code for NET6_0_OR_GREATER.
There is some define that was not including code for net6.0

@andrerav
Copy link
Contributor

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.

@andrerav andrerav self-assigned this Feb 19, 2022
andrerav added a commit that referenced this pull request Sep 5, 2022
@andrerav andrerav merged commit e192716 into MapsterMapper:master Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants