Skip to content

build: require the .NET 10 SDK via global.json - #1186

Merged
Dor-bl merged 1 commit into
appium:mainfrom
Dor-bl:build/require-dotnet-10-sdk
Nov 26, 2026
Merged

Dor-bl merged 1 commit into
appium:mainfrom
Dor-bl:build/require-dotnet-10-sdk

Conversation

@Dor-bl

@Dor-bl Dor-bl commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

PR title

build: require the .NET 10 SDK via global.json

Related issue

Closes # n/a. This unblocks the Dependabot bump of Microsoft.SourceLink.GitHub to 11.0.100 (#1171).

List of changes

  • Add global.json requiring SDK 10.0.100 or newer (rollForward: latestMajor, so SDK 11+ also works; no prereleases).
  • unit-test.yml and functional-test.yml: install the 10.0.x SDK alongside 8.0.x. 8.0 stays because the net8.0 tests run on that runtime.
  • release-nuget.yml: replace the stale 5.0.x setting with 10.0.x.
  • AGENTS.md: document the SDK requirement.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change that adds functionality or value)
  • Refactoring (non-breaking change that improves code without altering functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • New test coverage (non-breaking change that adds tests for existing, previously untested functionality)
  • Test fix (non-breaking change that improves test stability or correctness)
  • Chore/Maintenance (updates to build scripts, dependencies, or GitHub Actions)

Tests

  • Unit tests
  • Integration tests
  • No automated tests (explain why below)

How they run: This only changes build tooling, so the existing Unit Tests and Functional Tests workflows on this PR are the check: they now build with an explicitly installed SDK 10. I could not build locally because my machine has only SDK 9.0.321. With global.json in place, dotnet refuses up front with "A compatible .NET SDK was not found", which is the intended behaviour.

Documentation

  • Have you proposed a file change/PR with Appium to update documentation?
  • Not applicable (no user-facing behaviour change, e.g. tests, CI or maintenance only)

Details

Microsoft.SourceLink.GitHub 11.0.100 (with its Microsoft.Build.Tasks.Git and Microsoft.SourceLink.Common dependencies) now ships its .NET Core MSBuild tasks for net10.0. Up to 10.0.402 they targeted net8.0. Building #1171 with an SDK older than 10 fails:

error MSB4062: The "Microsoft.Build.Tasks.Git.LocateRepository" task could not be loaded from the assembly
...\microsoft.build.tasks.git\11.0.100\tools\net\Microsoft.Build.Tasks.Git.dll.
Could not load file or assembly 'System.Runtime, Version=10.0.0.0'

CI on #1171 is green only because there is no global.json. dotnet then uses the newest SDK on the runner, and the images happen to have SDK 10 preinstalled, whatever setup-dotnet was told. That also applies to the NuGet release job, which asked for 5.0.x. This PR states the requirement instead of relying on the runner image.

There is no impact on package consumers: SourceLink is PrivateAssets=all and a development dependency.

Suggested order: merge this, then @dependabot rebase #1171.

@github-actions github-actions Bot added the Build label Nov 25, 2026
Microsoft.SourceLink.GitHub 11.x ships its MSBuild tasks for net10.0, so
`dotnet build` with an 8.0 or 9.0 SDK fails with MSB4062. CI only passes
today because the runner images happen to have SDK 10 preinstalled and
nothing pins the SDK.

- Add global.json requiring SDK 10.0.100 or newer (rollForward latestMajor)
- Install 10.0.x in the unit, functional and release workflows; keep 8.0.x
  where the net8.0 tests run
- Replace the release workflow's stale 5.0.x setting
- Document the SDK requirement in AGENTS.md
@Dor-bl
Dor-bl force-pushed the build/require-dotnet-10-sdk branch from cbb5af7 to 21a5a06 Compare November 25, 2026 20:37
@Dor-bl
Dor-bl marked this pull request as ready for review November 25, 2026 20:59
@Dor-bl
Dor-bl requested review from KazuCocoa and a balanced review from Copilot and removed request for Copilot November 25, 2026 20:59
@Dor-bl
Dor-bl merged commit f01c9f4 into appium:main Nov 26, 2026
7 checks passed
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.

2 participants