Skip to content

[release/11.0] Install the SDK from sdk.version when tools.dotnet is not specified - #17818

Merged
ViktorHofer merged 1 commit into
dotnet:release/11.0from
ViktorHofer:backport/pr-17816-to-release/11.0
Nov 19, 2026
Merged

ViktorHofer merged 1 commit into
dotnet:release/11.0from
ViktorHofer:backport/pr-17816-to-release/11.0

Conversation

@ViktorHofer

Copy link
Copy Markdown
Member

Backport of #17816 to release/11.0.

When global.json doesn't specify tools.dotnet, Arcade installs/uses the SDK version from sdk.version. See #17816 for the full description.

Conflict resolution

release/11.0 doesn't have the multithreaded-task (IMultiThreadableTask/TaskEnvironment) changes from main, and its BuildTasks.props UsingTasks carry Architecture="*". Resolved accordingly:

  • LocateDotNet.cs: kept release/11.0's existing task structure (string cache key, Environment.GetEnvironmentVariable); applied only the TryGetDotNetSdkVersion change from the PR.
  • BuildTasks.props: removed the CheckRequiredDotNetVersion UsingTask, kept Architecture="*" on the remaining ones.
  • CheckRequiredDotNetVersion.cs: deleted, as in the original PR.

eng/common/tools.ps1, eng/common/tools.sh, Documentation/ArcadeSdk.md and LocateDotNetTests.cs applied cleanly; their diff is identical to #17816.

Validation

  • .\eng\common\build.ps1 -restore -build -projects src\Microsoft.DotNet.Arcade.Sdk.Tests\Microsoft.DotNet.Arcade.Sdk.Tests.csproj: passed (0 warnings, 0 errors).
  • dotnet test artifacts\bin\Microsoft.DotNet.Arcade.Sdk.Tests\Debug\net11.0\Microsoft.DotNet.Arcade.Sdk.Tests.dll --filter "FullyQualifiedName~LocateDotNetTests|FullyQualifiedName~InstallDotNetCoreTests": passed (9/9).
  • Dot-sourced eng/common/tools.ps1 against a synthetic repo whose global.json has only sdk.version and no tools section (pwsh 7 and Windows PowerShell 5.1): GetDotNetSdkVersion returned sdk.version, GlobalJsonSpecifiesDotNetSdk was true, default engine dotnet: passed.

To double check:

…otnet#17816)

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 92e5d4ad-1f02-4608-88b1-2420560b5813
Copilot-Session: e0dbec8f-3832-4bb7-a663-ed18780aec88
(cherry picked from commit 9f5b80b)
Copilot-Session: 3a6f64b5-da53-4d45-994a-ba2879c16c5e
Copilot AI balanced review requested due to automatic review settings November 19, 2026 07:49

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.

🟢 Approval recommended

The SDK-version fallback backport has no active review issues.

No open issues 🎉

What changed in this PR

Backports #17816 to release/11.0, allowing Arcade to install the SDK from sdk.version when tools.dotnet is absent, while preserving the release branch’s task structure.

Changes:

  • Adds SDK-version fallback to Bash, PowerShell, and LocateDotNet, keeping tools.dotnet precedence.
  • Adds parsing tests and documents the fallback and Maestro dependency-flow limitation.
  • Removes the unused CheckRequiredDotNetVersion task and its registration.
File Description
src/​Microsoft.DotNet.Arcade.Sdk/​tools/​BuildTasks.props Removes the obsolete task registration; retains existing architecture attributes.
src/​Microsoft.DotNet.Arcade.Sdk/​src/​LocateDotNet.cs Uses JSON parsing to resolve the SDK version with fallback.
src/​Microsoft.DotNet.Arcade.Sdk/​src/​CheckRequiredDotNetVersion.cs Deletes the unused version-check task.
src/​Microsoft.DotNet.Arcade.Sdk.Tests/​LocateDotNetTests.cs Tests precedence, fallback, supported JSON syntax, and errors.
eng/​common/​tools.sh Adds SDK-version fallback for Bash bootstrapping.
eng/​common/​tools.ps1 Adds fallback and supports an absent tools section.
Documentation/​ArcadeSdk.md Documents SDK-only configuration, precedence, and dependency-flow limitations.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants