Repository navigation
Use architecture-appropriate desktop MSBuild and remove Prefer64bit switch - #17026
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Use x64 version of desktop msbuild if process arch is amd64
Use architecture-appropriate desktop MSBuild (amd64/arm64) by default
Jun 18, 2026
Copilot
AI
changed the title
Use architecture-appropriate desktop MSBuild (amd64/arm64) by default
Use architecture-appropriate desktop MSBuild and remove Prefer64bit switch
Jun 18, 2026
ViktorHofer
marked this pull request as ready for review
June 18, 2026 16:21
ViktorHofer
approved these changes
Jun 18, 2026
ViktorHofer
enabled auto-merge (squash)
June 18, 2026 16:21
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Arcade’s Visual Studio MSBuild discovery to select a desktop msbuild.exe that matches the effective host architecture (including WOW64 scenarios), removing the previous Prefer64bit opt-in path that made non-x86 MSBuild effectively unreachable in many cases.
Changes:
- Update
InitializeVisualStudioMSBuildto chooseBin\amd64\msbuild.exeorBin\arm64\msbuild.exebased on host/process environment architecture, with a safe fallback toBin\msbuild.exe. - Remove the
Prefer64bitselection logic.
Show a summary per file
| File | Description |
|---|---|
| eng/common/tools.ps1 | Updates MSBuild exe selection to be architecture-appropriate by default and removes the Prefer64bit switch logic. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
Member
|
@mmitche / @rainersigwald PTAL |
mmitche
approved these changes
Jul 6, 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.
Desktop MSBuild was always launched as x86, even on amd64/arm64 hosts. The
Prefer64bitopt-in (from #7531) never became the default, so the x64 MSBuild was effectively unreachable, and arm64 was never considered.GetMSBuildExeineng/common/tools.ps1now selects the desktop MSBuild matching the host process architecture:PROCESSOR_ARCHITECTURE, falling back toPROCESSOR_ARCHITEW6432so a 32-bit process on a 64-bit OS resolves the real machine arch.AMD64→amd64\msbuild.exe,ARM64→arm64\msbuild.exe; anything else uses the root (32-bit)msbuild.exe.msbuild.exe.Prefer64bitswitch and its read from global.json (tools.vs), since arch-appropriate selection is now unconditional.To double check: