fix(setup): recognize Visual Studio Build Tools 2026 (v18) in Find-VsBuildTools#6038
fix(setup): recognize Visual Studio Build Tools 2026 (v18) in Find-VsBuildTools#6038LeoBorcherding wants to merge 2 commits into
Conversation
…BuildTools VS 2026 (MSBuild v18) was not in the year->version map or filesystem scan list, so Find-VsBuildTools returned $null even when the tools were physically installed. This caused a spurious "could not be found or installed" error and a forced exit during setup on Windows.
There was a problem hiding this comment.
Code Review
This pull request updates the Find-VsBuildTools function in studio/setup.ps1 to add support for Visual Studio 2026 (version 18) by updating the version map and the list of years used when scanning the filesystem. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b81e7e6bd3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary
Fixes #6037
Find-VsBuildToolsinstudio/setup.ps1had a hardcoded year→MSBuild-version map and filesystem scan list that only covered VS 2022, 2019, and 2017$nulleven when Build Tools 2026 was physically installed[ERROR] Visual Studio Build Tools could not be found or installed.and a hard exit during setupChanges
studio/setup.ps1—Find-VsBuildTools:'2026' = '18'to the$maplookup'2026'to the front of the$yearsfilesystem scan list (preferred over older versions)No changes to
setup.sh— VS Build Tools detection is Windows-only.Test plan
irm https://unsloth.ai/install.ps1 | iexon a machine with only VS Build Tools 2026 installed — setup should proceed past the VS detection stepstep "vs"printsVisual Studio 18 2026with correct source (vswhereorfilesystem (BuildTools))