Skip to content

Avoid .NET setup crashes on Windows ARM runners - #40

Merged
Has-X merged 2 commits into
mainfrom
dev
Aug 22, 2026
Merged

Avoid .NET setup crashes on Windows ARM runners#40
Has-X merged 2 commits into
mainfrom
dev

Conversation

@Has-X

@Has-X Has-X commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Replace actions/setup-dotnet on Windows ARM with a Windows PowerShell ARM64 SDK bootstrap. This avoids the intermittent PowerShell 7 CoreCLR crash tracked in dotnet/runtime#131636 while preserving the existing .NET 10 SDK for x64.

Copilot AI lite review requested due to automatic review settings August 22, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Windows ARM64 workflows still invoke pwsh for publish steps, which can undermine the stated goal of avoiding PowerShell 7/CoreCLR crashes on ARM runners.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the CI/release pipelines to avoid intermittent .NET setup failures on GitHub’s Windows ARM64 runners by replacing actions/setup-dotnet with a custom Windows PowerShell-based ARM64 SDK bootstrap, while keeping the existing .NET 10 SDK setup for Windows x64.

Changes:

  • Gate actions/setup-dotnet@v6 to Windows x64 only in build/release workflows.
  • Add and use a composite action to install .NET 10 ARM64 via dotnet-install.ps1 on Windows ARM64 runners.
  • Wire the new action into both build.yml and release.yml for ARM64 matrix entries.
File summaries
File Description
.github/workflows/release.yml Switches .NET setup to x64-only and uses the new ARM64 setup action for the Windows ARM64 release matrix.
.github/workflows/build.yml Switches .NET setup to x64-only and uses the new ARM64 setup action for the Windows ARM64 build matrix.
.github/actions/setup-dotnet-arm64/action.yml Adds a composite action that installs .NET 10 ARM64 using Windows PowerShell to avoid the actions/setup-dotnet bootstrap path on ARM runners.
Review details

Suppressed comments (1)

.github/workflows/release.yml:76

  • This workflow still runs the WinUI publish step under PowerShell 7 (pwsh), which may reintroduce the intermittent CoreCLR crash on Windows ARM runners that this PR is trying to avoid. Switching the publish step to Windows PowerShell (powershell.exe) keeps the dotnet invocation the same but avoids pwsh for this job.
        if: matrix.runtime == 'win-arm64'
      - uses: Swatinem/rust-cache@v2
      - name: Install Windows Rust target
        if: matrix.runtime != ''
        run: rustup target add ${{ matrix.rust_target }}
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +134 to +135
- uses: ./.github/actions/setup-dotnet-arm64
if: matrix.architecture == 'arm64'
Comment on lines +14 to +16
Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -OutFile $installer -UseBasicParsing
& $installer -Channel 10.0 -Architecture arm64 -InstallDir $installRoot -NoPath
if ($LASTEXITCODE -ne 0) { throw "dotnet-install.ps1 failed with exit code $LASTEXITCODE" }
@Has-X
Has-X merged commit bc650d9 into main Aug 22, 2026
6 checks passed
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.

2 participants