Clarify arcade upstream fix requirements for exit code propagation#33897
Closed
Clarify arcade upstream fix requirements for exit code propagation#33897
Conversation
Previously, eng/build.ps1 always exited with 0 regardless of whether the underlying build succeeded or failed. This caused Azure Pipelines to show steps as 'succeeded' even when they failed (e.g., when the .NET SDK was not found). The fix captures $LASTEXITCODE after Invoke-Expression and uses it as the script's exit code instead of always exiting 0.
Copilot
AI
changed the title
[WIP] Fix build.ps1 to propagate exit codes
Clarify arcade upstream fix requirements for exit code propagation
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fix in this PR addresses exit code propagation in MAUI's
eng/build.ps1wrapper. @rmarinho requested the same fix be applied upstream to dotnet/arcade.Investigation Results
Arcade structure differs from MAUI:
eng/build.ps1wrapper exists in arcadeBuild.cmddirectly callseng/common/build.ps1eng/common/build.ps1has similarExitWithExitCode 0at endIntentional CI behavior in arcade:
MSBuild-Coreineng/common/tools.ps1deliberately returns exit code 0 in Azure PipelinesWrite-PipelineSetResult -Result "Failed"to mark failures$ci -and $env:SYSTEM_TEAMPROJECTis setRequired Clarification
Any upstream fix must balance:
Options:
eng/common/build.ps1to capture and propagate exit codes (similar to this PR's approach)MSBuild-CoreAwaiting direction on approach before submitting arcade PR.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.