Remove ARM64 special handling from install-dotnet pipeline template#4442
Conversation
UseDotNet@2 v271+ now correctly detects win-arm64 and installs the matching SDK/runtime, fixing the long-standing bug that installed x86 on ARM64 hosts: microsoft/azure-pipelines-tasks#20300 This removes our workaround: - install-dotnet.yml: drop the ARM64 branch and the custom PowerShell installer step. Replace the architecture enum (x64/x86/arm64) with a forceX86 boolean, since forcing x86 was the only remaining behavior. - Delete install-dotnet-arm64.ps1 (no longer referenced). - ci-run-tests-job.yml: always pass runtimes in UseDotNet@2 format, remove the isArm64 parameter, and use forceX86 for the x86 install. - ci-run-tests-stage.yml: drop the isArm64 passthroughs. - dotnet-sqlclient-ci-core.yml: drop isArm64 from the arm64 matrix entry (the ARM64 agent is still selected via pool/images).
There was a problem hiding this comment.
Pull request overview
This PR simplifies the Azure DevOps pipeline .NET installation flow by removing the ARM64-specific workaround script and relying on fixed UseDotNet@2 behavior to install the native SDK/runtime on Windows ARM64 agents.
Changes:
- Removed ARM64 branching and custom PowerShell installer usage; standardized on
UseDotNet@2for all architectures. - Replaced the install template’s
architectureenum with aforceX86boolean to support x86 cross-install scenarios. - Removed
isArm64wiring across the CI core pipeline matrix and test stage/job templates, and normalized runtime version formats to[8.x, 9.x].
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/dotnet-sqlclient-ci-core.yml | Removes isArm64 from the ARM64 matrix entry; ARM64 selection remains via pool/image. |
| eng/pipelines/common/templates/stages/ci-run-tests-stage.yml | Stops passing isArm64 into the test job template. |
| eng/pipelines/common/templates/jobs/ci-run-tests-job.yml | Drops isArm64 parameter usage; always installs runtimes via UseDotNet@2 format; uses forceX86: true for x86 installs. |
| eng/pipelines/common/steps/install-dotnet.yml | Removes ARM64 special-casing and introduces forceX86 parameter for x86 cross-install behavior. |
| eng/pipelines/common/steps/install-dotnet-arm64.ps1 | Deletes the now-unreferenced ARM64 install script. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4442 +/- ##
==========================================
- Coverage 65.83% 64.34% -1.50%
==========================================
Files 287 287
Lines 43763 66952 +23189
==========================================
+ Hits 28812 43081 +14269
- Misses 14951 23871 +8920
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mdaigle
left a comment
There was a problem hiding this comment.
All looks good. Can you please link passing CI and non-official runs?
Do we need to update other pipelines like MI, kerberos, etc.?
|
All pipelines that install .NET SDKs and/or Runtimes have been noted in the PR description, with links to completed or in-progress runs. |
UseDotNet@2 v271+ now correctly detects win-arm64 and installs the matching SDK/runtime, fixing the long-standing bug that installed x86 on ARM64 hosts: microsoft/azure-pipelines-tasks#20300 This removes our workaround: - install-dotnet.yml: drop the ARM64 branch and the custom PowerShell installer step. Replace the architecture enum (x64/x86/arm64) with a forceX86 boolean, since forcing x86 was the only remaining behavior. - Delete install-dotnet-arm64.ps1 (no longer referenced). - ci-run-tests-job.yml: always pass runtimes in UseDotNet@2 format, remove the isArm64 parameter, and use forceX86 for the x86 install. - ci-run-tests-stage.yml: drop the isArm64 passthroughs. - dotnet-sqlclient-ci-core.yml: drop isArm64 from the arm64 matrix entry (the ARM64 agent is still selected via pool/images).
Description
The
UseDotNet@2task historically installed the x86 build on Windows ARM64 hosts because it detected the architecture from the x86 pipeline agent'sPROCESSOR_ARCHITECTURE. To work around this, ourinstall-dotnet.ymltemplate forked to a custominstall-dotnet-arm64.ps1script for ARM64.That bug is now fixed:
UseDotNet@2v271+ correctly detectswin-arm64and installs the matching SDK/runtime (see azure-pipelines-tasks#20300, fixed by #21801). We no longer need the workaround.Changes (engineering/CI only — no product code or API changes):
install-dotnet.yml— Removed the ARM64 branch and the customPowerShell@2installer step. A singleUseDotNet@2path now handles all architectures (ARM64 auto-detected). Replaced thearchitectureenum (x64/x86/arm64) with aforceX86boolean, since forcing an x86 cross-install was the only remaining behavior the parameter controlled.install-dotnet-arm64.ps1— no longer referenced.ci-run-tests-job.yml— Always passes runtimes in theUseDotNet@2version format ([8.x, 9.x]); removed the now-unusedisArm64parameter; the x86 test install now usesforceX86: true.ci-run-tests-stage.yml— Removed theisArm64passthroughs.dotnet-sqlclient-ci-core.yml— RemovedisArm64: truefrom thewindows_azure_arm64_sqlmatrix entry (the ARM64 agent is still selected viapool/images).Net: 5 files changed, ~390 lines removed.
Issues
Relates to the upstream fix in microsoft/azure-pipelines-tasks#20300.
Testing
See the legacy PR pipelines for successful ARM64 and x86 runs. The modern sqlclient-pr pipeline confirms no regressions.
We see the ARM64 SDK being installed now via the latest
UseDotNet@2task:Same with the runtimes:
We see this confirmed by the step that reports the installed SDKs and Runtimes:
Pipeline Runs
install-dotnet.yml, but they do use theUseDotNet@2task.