Skip to content

Upgrade to .NET 10#142

Merged
feO2x merged 4 commits into
mainfrom
141-net-10-upgrade
Jul 13, 2026
Merged

Upgrade to .NET 10#142
feO2x merged 4 commits into
mainfrom
141-net-10-upgrade

Conversation

@feO2x

@feO2x feO2x commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Closes #141

Implemented as specified in the plan.

feO2x added 3 commits July 13, 2026 08:06
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>
@feO2x feO2x requested a review from Copilot July 13, 2026 06:57
@feO2x feO2x self-assigned this Jul 13, 2026
@feO2x feO2x linked an issue Jul 13, 2026 that may be closed by this pull request
8 tasks
@feO2x feO2x added the chore label Jul 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.json and update GitHub Actions to install the SDK using global-json-file.
  • Retarget library, tests, benchmarks, and source-export tooling to net10.0 (preserving netstandard2.0/netstandard2.1 for the main package) and adjust package references for .NET 10 framework pruning.
  • Update source-export targeting (Net8_0Net10_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.

Comment thread Directory.Packages.props
Comment thread .github/workflows/build-and-test.yml
…ersion need to be aligned

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@feO2x feO2x merged commit e46df43 into main Jul 13, 2026
1 check passed
@feO2x feO2x deleted the 141-net-10-upgrade branch July 13, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to .NET 10

2 participants