Revert "Enable detection cmake script for Visual Studio 2026 and pre-release versions of Visual Studio"#14268
Conversation
…release …" This reverts commit 893b5a3.
| # Require that Clang be installed in the product to potentially de-deduplicate | ||
| execute_process( | ||
| COMMAND "${VSWHERE_SOURCE_DIR}/vswhere.exe" -version "[17.0,19.0)" -products * -requires Microsoft.VisualStudio.Component.VC.Llvm.Clang -property installationPath -prerelease | ||
| COMMAND "${VSWHERE_SOURCE_DIR}/vswhere.exe" -version "[17.0,18.0)" -products * -requires Microsoft.VisualStudio.Component.VC.Llvm.Clang -property installationPath |
There was a problem hiding this comment.
I could be convinced to add -prerelease back, but I'm not sure there even are prerelease versions of VS2022 anymore...
There was a problem hiding this comment.
Pull request overview
This PR reverts changes to the Visual Studio detection logic in CMakeLists.txt that were causing build failures when multiple versions of Visual Studio are installed. The original change expanded the vswhere version range to include VS2026 and added support for pre-release versions, but this caused vswhere to select newer/preview versions instead of the required VS2022.
Changes:
- Narrowed vswhere version range from
[17.0,19.0)back to[17.0,18.0)to target only VS2022 - Removed
-prereleaseflag to exclude pre-release Visual Studio versions from detection
OneBlue
left a comment
There was a problem hiding this comment.
Sad that we have to revert but given that there's no support for VS 2026 in our pipeline at the moment I think this is the right thing to do for now
Reverts #14160
This causes issues when multiple versions of Visual Studio are installed.