Skip to content

Add --vsver selection and rb msvc list - #5

Merged
hsbt merged 2 commits into
masterfrom
claude/rb-msvc-buildtool-versions-3404e5
Jul 23, 2026
Merged

Add --vsver selection and rb msvc list#5
hsbt merged 2 commits into
masterfrom
claude/rb-msvc-buildtool-versions-3404e5

Conversation

@hsbt

@hsbt hsbt commented Jul 23, 2026

Copy link
Copy Markdown
Member

rb msvc enable and rb msvc exec always activated the newest Visual Studio that vswhere finds. This adds a way to pin the product year without changing that default, which stays safe because every VS 2015+ toolset is ABI-compatible with x64-mswin64_140.

rb msvc exec --vsver 2019 gem install json
rb msvc list

The value is 2017|2019|2022|2026|latest and can also be set per session via RBMANAGER_VSVER. The flag wins. For exec the option is recognized only before the command and -- ends option parsing. When the requested year is not installed, the warning lists the installed years and the matching Build Tools winget id. The year shown by rb msvc list is derived from the installationVersion major because the Dev18 series reports catalog.productLineVersion as 18 while its display name says 2026. Verified against a machine with all four generations installed.

hsbt and others added 2 commits July 23, 2026 14:43
The activation commands always resolved the newest Visual Studio via vswhere -latest. A product year (2017/2019/2022/2026) can now be pinned per invocation with --vsver or per session with RBMANAGER_VSVER, mapped to vswhere -version ranges, and rb msvc list shows the installed toolchains. The year is derived from the installationVersion major because the Dev18 series reports catalog.productLineVersion "18" even though its displayName says 2026.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers the argument parsers, the flag/env precedence, the missing-year warning, and per-year resolution against real installs. Plan cases are numbered 76-85 because 75 was already taken by the AOT publish smoke.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 05:44

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@hsbt
hsbt merged commit 4e3facd into master Jul 23, 2026
3 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