Upgrade to .NET 10#142
Merged
Merged
Conversation
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
Closed
8 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades Light.GuardClauses and its tooling/CI baseline from .NET 8/C# 12 to .NET 10 (SDK 10.0.300) and C# 14, while aligning the source-export pipeline and Roslyn dependencies with the new pinned SDK.
Changes:
- Pin SDK to 10.0.300 via
global.jsonand update GitHub Actions to install the SDK usingglobal-json-file. - Retarget library, tests, benchmarks, and source-export tooling to net10.0 (preserving
netstandard2.0/netstandard2.1for the main package) and adjust package references for .NET 10 framework pruning. - Update source-export targeting (
Net8_0→Net10_0) and parse options to C# 14 with the appropriate preprocessor symbol set.
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/source-export/Light.GuardClauses.SourceValidation/Light.GuardClauses.SourceValidation.csproj | Retargets validation harness to netstandard2.0;net10.0 and conditions System.Collections.Immutable for pruning. |
| tools/source-export/Light.GuardClauses.SourceCodeTransformation/SourceTargetFramework.cs | Renames modern export target enum to Net10_0. |
| tools/source-export/Light.GuardClauses.SourceCodeTransformation/SourceReachabilityAnalyzer.cs | Uses C# 14 parse options and updates preprocessor symbols for .NET 10 export selection. |
| tools/source-export/Light.GuardClauses.SourceCodeTransformation/SourceFileMerger.cs | Updates modern-target conditional imports for Net10_0. |
| tools/source-export/Light.GuardClauses.SourceCodeTransformation/RepositoryLayout.cs | Changes repository root marker from .sln to .slnx. |
| tools/source-export/Light.GuardClauses.SourceCodeTransformation/Light.GuardClauses.SourceCodeTransformation.csproj | Retargets source-export tool to net10.0 and removes redundant Immutable package reference. |
| tools/source-export/Light.GuardClauses.SourceCodeTransformation/GeneratedFileBuildValidator.cs | Maps validator target framework to net10.0. |
| tools/analyzers/Light.GuardClauses.InternalRoslynAnalyzers.CodeFixes/Light.GuardClauses.InternalRoslynAnalyzers.CodeFixes.csproj | Removes Workspaces VersionOverride to use centrally pinned Roslyn. |
| tests/Light.GuardClauses.Tests/Light.GuardClauses.Tests.csproj | Moves default test TFM to net10.0. |
| tests/Light.GuardClauses.SourceCodeTransformation.Tests/TestEnvironment.cs | Updates root discovery marker to .slnx. |
| tests/Light.GuardClauses.SourceCodeTransformation.Tests/SourceFileMergerFrameworkTests.cs | Renames/retargets tests from Net8 export expectations to Net10. |
| tests/Light.GuardClauses.SourceCodeTransformation.Tests/Light.GuardClauses.SourceCodeTransformation.Tests.csproj | Retargets source-export tests to net10.0. |
| tests/Light.GuardClauses.SourceCodeTransformation.Tests/GeneratedFileBuildValidatorTests.cs | Updates validation tests to use Net10_0. |
| tests/Light.GuardClauses.InternalRoslynAnalyzers.Tests/Light.GuardClauses.InternalRoslynAnalyzers.Tests.csproj | Retargets analyzer tests to net10.0. |
| src/Light.GuardClauses/Light.GuardClauses.csproj | Replaces net8.0 asset with net10.0 and updates AOT/pruning conditions. |
| src/Directory.Build.props | Removes explicit Microsoft.SourceLink.GitHub package reference for .NET 10 SDK behavior. |
| README.md | Updates user-facing documentation to reflect .NET 10 support. |
| Light.GuardClauses.slnx | Adds new .slnx solution format file. |
| Light.GuardClauses.sln | Removes classic .sln solution file. |
| Light.GuardClauses.SingleFile.cs | Minor formatting tweak in generated single-file output. |
| global.json | Pins SDK to 10.0.300 with latestPatch roll-forward. |
| Directory.Packages.props | Pins Roslyn to 5.6.0 and updates centrally managed package versions for .NET 10. |
| Directory.Build.props | Sets <LangVersion>14</LangVersion> for C# 14 compilation. |
| benchmarks/Light.GuardClauses.Performance/Light.GuardClauses.Performance.csproj | Retargets benchmarks to net10.0;net48. |
| ai-plans/0141-net-10-upgrade.md | Adds the plan documenting the .NET 10 upgrade steps/criteria. |
| .github/workflows/release-on-nuget.yml | Uses global-json-file: global.json and removes separate SDK version input. |
| .github/workflows/build-and-test.yml | Uses global-json-file and switches CI build entrypoint to the .slnx solution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ersion need to be aligned Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #141
Implemented as specified in the plan.