Adopt .NET 10 with multitargeting#25
Open
JohnCampionJr wants to merge 3 commits into
Open
Conversation
Multi-target net8.0;net10.0 for the tool and tests, bump the SDK and CI to .NET 10, and run the tests on both runtimes. AnalysisLevel tracks the TFM now; fixed the findings it surfaced (CA1515 -> internal types with InternalsVisibleTo for Moq, CA1872 -> Convert.ToHexString).
Author
|
Sorry, accidentally closed it; certainly didn't mean to. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adopts .NET 10 by multi-targeting the tool and test projects (net8.0 + net10.0), updates CI/CodeQL SDK setup accordingly, and reduces the library’s exposed surface area by making several types internal.
Changes:
- Multi-target the main package and tests for
net8.0;net10.0and adjust language/analyzer settings per target. - Update CI/CodeQL workflows and
global.jsonto use .NET 10 SDK. - Make multiple previously
publictypesinternaland addInternalsVisibleTofor proxy-based mocking.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/SolarWinds.Changesets.Tests/Version/CsProjectsRepositoryTests.cs | Simplifies SHA256 hash-to-hex conversion using Convert.ToHexString. |
| tests/SolarWinds.Changesets.Tests/SolarWinds.Changesets.Tests.csproj | Multi-targets tests for net8.0 and net10.0. |
| tests/SolarWinds.Changesets.Tests/ProcessExecutorTests.cs | Extends non-Windows test execution path to include macOS. |
| src/SolarWinds.Changesets/SolarWinds.Changesets.csproj | Multi-targets package and enables internals access for dynamic proxy mocking. |
| src/SolarWinds.Changesets/Shared/ResultCodes.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/ProcessOutput.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/ProcessExecutor.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/InitializationException.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/IProcessExecutor.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/IConfigurationService.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/IChangesetsRepository.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/Constants.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/ChangesetFile.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/ChangesetConfig.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Shared/BumpType.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Commands/Publish/Services/IGitService.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Commands/Publish/Services/IDotnetService.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Commands/Publish/Services/GitService.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Commands/Publish/Services/DotnetService.cs | Changes visibility to internal. |
| src/SolarWinds.Changesets/Commands/Add/IProjectFileNamesLocator.cs | Changes visibility to internal. |
| global.json | Pins repo SDK to .NET 10 feature band. |
| Directory.Build.props | Conditions C# language and analyzer levels per target framework. |
| .github/workflows/codeql.yml | Uses .NET 10 SDK for CodeQL build. |
| .github/workflows/ci.yml | Installs both .NET 8 and .NET 10 SDKs in CI. |
| .changeset/adopt-dotnet-10.md | Adds a changeset entry describing .NET 10 adoption. |
Comment on lines
+6
to
+7
| <LangVersion Condition="'$(TargetFramework)' == 'net8.0'">12.0</LangVersion> | ||
| <LangVersion Condition="'$(TargetFramework)' == 'net10.0'">14.0</LangVersion> |
Comment on lines
+27
to
+28
| <AnalysisLevel Condition="'$(TargetFramework)' == 'net8.0'">8</AnalysisLevel> | ||
| <AnalysisLevel Condition="'$(TargetFramework)' == 'net10.0'">10</AnalysisLevel> |
Use 10.0.100 with rollForward latestFeature so any installed .NET 10 feature band satisfies it, instead of requiring 10.0.300 or higher.
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 #16.
Multi-targets net8.0 and net10.0 for both the tool and the tests, bumps the SDK and CI to .NET 10, and runs the test suite against both runtimes.
Raising AnalysisLevel to 10 (tracking the new TFM) surfaced two rules, fixed rather than suppressed:
Left the Spectre.Console and other package upgrades out to keep this focused; can follow up separately.
Also adds macOS support to ProcessExecutorTests (was throwing on OSX).