Skip to content

Enable detection cmake script for Visual Studio 2026 and pre-release versions of Visual Studio#14160

Open
andysterland wants to merge 3 commits intomicrosoft:masterfrom
andysterland:addDev18.0
Open

Enable detection cmake script for Visual Studio 2026 and pre-release versions of Visual Studio#14160
andysterland wants to merge 3 commits intomicrosoft:masterfrom
andysterland:addDev18.0

Conversation

@andysterland
Copy link
Member

@andysterland andysterland commented Feb 4, 2026

Summary of the Pull Request

Updates to enable the creation of the .slnx file with Visual Studio 2026 and preview versions of Visual Studio (either 2022 or 2026).

PR Checklist

Detailed Description of the Pull Request / Additional comments

Update the args for calling vswhere to:

  • Changed the, exclusive, max version to 19.0 from 18.0 so VS2026 installs will be searched for
  • Added the arg --prerelease so that prerelease versions of Visual Studio are included in the search for VS installs, so preview and insiders installs will be found.
  • Added the arg --latest so that the latest version of VS is returned assuming the developer wants to use the latest version of VS this is optional but it seemed better to be explicit about which VS version will be selected if multiple are available.

Validation Steps Performed

Ran cmake . in a fresh repo with VS2026 installed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CMake build configuration to support Visual Studio 2026 and preview/insider builds of Visual Studio (both 2022 and 2026).

Changes:

  • Updated the vswhere.exe version search range from [17.0,18.0) to [17.0,19.0) to include VS2026 (version 18.x)
  • Added the -prerelease flag to include preview and insider builds of Visual Studio
  • Added the -latest flag to explicitly select the newest version when multiple installations are present

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.

1 participant