Skip to content

Run tests on .NET 6 #2951

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

Merged
merged 32 commits into from
Jan 10, 2022
Merged

Run tests on .NET 6 #2951

merged 32 commits into from
Jan 10, 2022

Conversation

hazzik
Copy link
Member

@hazzik hazzik commented Dec 1, 2021

No description provided.

<ContentSQLiteInteropFiles>true</ContentSQLiteInteropFiles>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
Copy link
Member

Choose a reason for hiding this comment

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

Why not introduce global NhNetCore property and use it for all such places instead to simplify further retargeting?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because this is not so easy... I tried it when targeting both .NET Core 3.1 and .NET 6... The dependencies could/were a little different. For example, Microsoft.AspNetCore.OData does not have problems on 3.1 but has problems in 6.0.

Copy link
Member

Choose a reason for hiding this comment

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

Ehm... I want to convert checks like <PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'"> to something like <PropertyGroup Condition="NhNetCore">. Looks easy enough for me.. Not sure I understand your problem - are you talking about targeting both 3.1 and 6.0? IMO that's a bit different issue and should be handled separately

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks easy enough

Yes, it is easy, but I doubt it will solve any real issue.

are you talking about targeting both 3.1 and 6.0?

I was going to make it target .NET 3.1 and .NET 6 rc initially. I started working on the switch around last betas and before .NET 6 rc.1 came out. But I did not have enough time and motivation to finish that at that time. So because of differences in the supported features (like SYSLIB0011 - BinaryFormatter depreciation which is quite aggressive) and different dependencies between .NET 3.1 and .NET 6.0 it required having 2 different monikers like NhNetCore31 and NhNet60. Which defied the purpose of the simplification.

Also, the same could happen when we transition from .NET 6 to next version. Depends on the path we're willing to take.

So, frankly, I do not believe that a simple bump of a version in NhNetCore would be enough to migrate to the later versions. Seems like we're trying to solve the problem which we might not have.

For NhNet it does have sense to use it because Microsoft has promised that 4.x API would stay backwards compatible.

@bahusoid

This comment has been minimized.

bahusoid
bahusoid previously approved these changes Jan 7, 2022
@bahusoid
Copy link
Member

bahusoid commented Jan 14, 2022

Just noticed that Rider no longer recognizes symbols from ANTLR generated code. Is it only me or I wonder if it's somehow related to .NET 6 SDK that I recently installed

For instance HqlSqlWalker no longer sees generated constants:
image

@hazzik
Copy link
Member Author

hazzik commented Jan 14, 2022

Same here. Probably issue with Rider. Probably worth to create a ticket in their issue tracker.


<DisableImplicitPackageTargetFallback>True</DisableImplicitPackageTargetFallback>
</PropertyGroup>
<PropertyGroup Condition="'$(IsPackable)' == 'True'">
Copy link
Member

Choose a reason for hiding this comment

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

What this $(IsPackable) about? I don't think it works properly. At least it seems all this information is now missing in generated nuget package

Copy link
Member Author

Choose a reason for hiding this comment

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

:-(

Copy link
Member Author

Choose a reason for hiding this comment

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

@bahusoid. '$(IsPackable)' evaluates to 'true' instead of 'True'.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be fixed here: #3125

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