-
Notifications
You must be signed in to change notification settings - Fork 884
Add support for .NET 9 #2362
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
base: master
Are you sure you want to change the base?
Add support for .NET 9 #2362
Conversation
ffernandolima
commented
Nov 20, 2024
- Removed support for .NET 6 as it has reached the end of support;
- Added support for .NET 9;
- Set 'LangVersion' to 'latest'.
Added support for .NET 9; Set 'LangVersion' to 'latest'.
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
0218744 to
552eb2a
Compare
|
Would it make sense to add support for a version of .NET that isn't LTS? |
552eb2a to
db7bf99
Compare
@Havret, I agree with you to some extent, and I believe this is open for discussion. However, the primary objective of this PR is to remove .NET 6, as it has reached its end of support and should no longer be used in active development. |
92c0a63 to
8971a04
Compare
Could just do a multi-target so you always have current STS + LTS versions, ie: net8/net9. |
8971a04 to
77440be
Compare
@Im5tu, that was exactly what I did through this PR. Projects released as Nuget packages support multi-target. |
5a515b0 to
063a323
Compare
Added support for .NET 9; Set 'LangVersion' to 'latest'.
063a323 to
69465da
Compare
I think yes, it makes sense. Each yearly release, whether STS or LTS, includes valuable performance improvements, new features, and bug fixes. If you only upgrade every two years, you risk missing out on incremental enhancements. Another point is: that by updating more frequently, you typically face smaller, more manageable changes rather than a large, potentially disruptive jump. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request updates the project to support .NET 9 while removing support for the end-of-life .NET 6 framework. The changes modernize the language version settings and update conditional compilation directives to accommodate the new framework.
- Updated target frameworks from .NET 6 and .NET 8 to .NET 8 and .NET 9 across all projects
- Updated LangVersion from specific versions (7.1, 7.3) to 'latest' for modernized C# features
- Modified conditional compilation for NJsonSchema packages to support .NET 9
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Test projects | Updated TargetFrameworks from net6.0;net8.0 to net8.0;net9.0 |
| Source projects | Updated framework targeting and package conditions for .NET 9 support |
| Example projects | Migrated from net6.0 to net9.0 and updated LangVersion to latest |
| JsonWithReferences example | Added conditional compilation for NJsonSchema compatibility |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.