Adopt .NET 10 with multitargeting#25
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).
|
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. |
Use 10.0.100 with rollForward latestFeature so any installed .NET 10 feature band satisfies it, instead of requiring 10.0.300 or higher.
only one lang and analysis should be supported (we will develop in .net 10, yet compile for .net 8-10)
…y.build.props Removed net10.0 from the target frameworks.
for building all .net 8-10 we just need the .net 10 sdk
|
@JohnCampionJr Thank you for your contribution, and I apologize for the delay in reviewing your pull request. We will merge all PRs and release the new version ASAP. I have a demo repository where I configured the original https://github.com/changesets/action to work with our net-changesets tool. You can find it here: After each merge to the main branch, the action creates a release PR. During this process, all changeset files are converted into changelog entries, and the package version is bumped by running the changeset version. Example release PR: The action is wired to the .NET Changesets implementation here: You can provide your own commands for both the versioning and publishing steps. In our case, we use this mechanism to invoke the .NET implementation instead of the default JavaScript-based one. |
| "SolarWinds.Changesets": Minor | ||
| --- | ||
|
|
||
| Adopt .NET 10 with multi-targeting. The tool and tests now target net8.0 and net10.0, the SDK and CI use .NET 10, and the test suite runs against both runtimes. |
There was a problem hiding this comment.
@jvilimek, this must be updated according to the new changes
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).