Skip to content

fix(setup): recognize Visual Studio Build Tools 2026 (v18) in Find-VsBuildTools#6038

Draft
LeoBorcherding wants to merge 2 commits into
unslothai:mainfrom
LeoBorcherding:fix/setup-vs2026-build-tools
Draft

fix(setup): recognize Visual Studio Build Tools 2026 (v18) in Find-VsBuildTools#6038
LeoBorcherding wants to merge 2 commits into
unslothai:mainfrom
LeoBorcherding:fix/setup-vs2026-build-tools

Conversation

@LeoBorcherding
Copy link
Copy Markdown
Contributor

Summary

Fixes #6037

  • Find-VsBuildTools in studio/setup.ps1 had a hardcoded year→MSBuild-version map and filesystem scan list that only covered VS 2022, 2019, and 2017
  • VS 2026 (MSBuild v18) was not in either list, so the function returned $null even when Build Tools 2026 was physically installed
  • This caused a spurious [ERROR] Visual Studio Build Tools could not be found or installed. and a hard exit during setup

Changes

studio/setup.ps1Find-VsBuildTools:

  • Added '2026' = '18' to the $map lookup
  • Added '2026' to the front of the $years filesystem scan list (preferred over older versions)

No changes to setup.sh — VS Build Tools detection is Windows-only.

Test plan

  • Run irm https://unsloth.ai/install.ps1 | iex on a machine with only VS Build Tools 2026 installed — setup should proceed past the VS detection step
  • Confirm step "vs" prints Visual Studio 18 2026 with correct source (vswhere or filesystem (BuildTools))
  • Existing VS 2022 installs unaffected

…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.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread studio/setup.ps1 Outdated
@LeoBorcherding LeoBorcherding marked this pull request as draft June 6, 2026 11:31
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.

setup.ps1 fails to detect Visual Studio Build Tools 2026 (v18) — spurious "could not be found or installed" error

1 participant