Skip to content

Add multi-targeting for .NET 8#618

Closed
jevansaks wants to merge 1 commit into
json-everything:masterfrom
jevansaks:user/jevansaks/net8
Closed

Add multi-targeting for .NET 8#618
jevansaks wants to merge 1 commit into
json-everything:masterfrom
jevansaks:user/jevansaks/net8

Conversation

@jevansaks

@jevansaks jevansaks commented Jan 24, 2024

Copy link
Copy Markdown
Contributor

To enable us to make opportunistic improvements to JsonSchema.NET for .NET 8 customers while keeping support for .NET Standard 2.0, this change adds multi-targeting support to all the projects.

I verified that consuming the new nupkg from a WPF or Net Standard 2.0 project gets the netstandard2.0 dll out of the nupkg, while a NET 8 project picks up the one from the net 8 folder.

Related to #390
Related to #532 (maybe resolves)

@gregsdennis

Copy link
Copy Markdown
Collaborator

Hey @jevansaks thanks. I'd be happy with you just adding onto this PR. I'd prefer not just having this without the reason for doing it (supporting Native AOT).

I'm not afraid of a significant PR, and I understand this change will be considerable.


<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net8</TargetFrameworks>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd actually prefer dropping 3.1 and having the current LTS versions here (6 & 8).

Also, can you update the other test projects, please?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure. So you'd like these projects that were netcoreapp3.1;net6.0 to be net6.0;net8?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

And anything that is netcoreapp3.1 should be net6;net8 too?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should only be tests that have .Net Core 3.1, but yes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As long as we are continuing to support netstandard2.0 then we should continue to have netcoreapp3.1-based tests so that we can exercise both the reflection-based and JsonTypeInfo-based paths. We can have tests built and run 3x if you want to exercise netcoreapp3.1 and net6 and net8.

@gregsdennis

Copy link
Copy Markdown
Collaborator

I'm going to close this and replace with a PR from the native-aot branch. It'll let me more easily work on this myself, and it includes some other things I've already done in working toward updating to .Net 6.

@gregsdennis gregsdennis mentioned this pull request Jan 24, 2024
17 tasks
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.

2 participants