Describe the bug
VS 2026 insider is available now, I'm using cmake built with VS2026 support (master branch of https://gitlab.kitware.com/cmake/cmake - version 4.2 is not released yet) which is working properly with VS2026 in my testing, but even when I set VCPKG_VISUAL_STUDIO_PATH vcpkg using 14.44 compiler instead of 14.50 (C:\opt\vs2026\VC\Tools\MSVC\14.44.35207 instead of C:\opt\vs2026\VC\Tools\MSVC\14.50.35503 in my setup)
When I add
set(VCPKG_PLATFORM_TOOLSET v145)
to triplet file I'm getting next error
error: in triplet x64-windows: Unable to find a valid Visual Studio instance
at "C:\opt\vs2026"
with toolset version v145
The following Visual Studio instances were considered:
C:\opt\vs2022
C:\opt\vs2019
C:\opt\vs2026
The following paths were examined for Visual Studio instances:
C:\opt\vs2022\VC\Auxiliary/Build\vcvarsall.bat
C:\opt\vs2019\VC\Auxiliary/Build\vcvarsall.bat
C:\opt\vs2026\VC\Auxiliary/Build\vcvarsall.bat
Environment
- OS: Windows 11 25H2
- Compiler: cl 19.50.35503 from Visual Studio 2026 v18.0.0-insiders
To Reproduce
Steps to reproduce the behavior:
- Build cmake with VS2026 support from master branch or get nightly build - https://cmake.org/files/dev/?C=M;O=D and put it in path
- set VCPKG_VISUAL_STUDIO_PATH=C:\opt\vs2026 (otherwise VS2022 is used)
- set VCPKG_FORCE_SYSTEM_BINARIES=1 (to use cmake with VS2026 support)
- vcpkg install abseil:x64-windows
- Observe old compiler used in buildtrees\detect_compiler\config-x64-windows-out.log
#COMPILER_C_VERSION#19.44.35215.0
#COMPILER_C_ID#MSVC
#COMPILER_C_PATH#C:/opt/vs2026/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
#COMPILER_CXX_VERSION#19.44.35215.0
#COMPILER_CXX_ID#MSVC
#COMPILER_CXX_PATH#C:/opt/vs2026/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
- Add
set(VCPKG_PLATFORM_TOOLSET v145) to triplets/x64-windows.cmake
- get
Unable to find a valid Visual Studio instance error
Expected behavior
When VS 2026 used, v145 toolset supported and used by default
Failure logs
C:\tmp\vcpkg\buildtrees\detect_compiler\stdout-x64-windows.log
-- Found external ninja('1.12.1').
-- Configuring x64-windows
[1/1] "C:/opt/apps/cmake/current/bin/cmake.exe" -E chdir ".." "C:/opt/apps/cmake/current/bin/cmake.exe" "C:/tmp/vcpkg/scripts/detect_compiler" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/tmp/vcpkg/packages/detect_compiler_x64-windows" "-DVCPKG_COMPILER_CACHE_FILE=C:/tmp/vcpkg/installed/vcpkg/compiler-file-hash-cache.json" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/tmp/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/tmp/vcpkg" "-DZ_VCPKG_ROOT_DIR=C:/tmp/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/tmp/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
-- The C compiler identification is MSVC 19.44.35215.0
-- The CXX compiler identification is MSVC 19.44.35215.0
#COMPILER_HASH#37968c396ae4fe042c6ac7cb0118f08bcc5350f2
#COMPILER_C_HASH#3c62be3c178526242f2c45cf8ccbe3c55048a1a8
#COMPILER_C_VERSION#19.44.35215.0
#COMPILER_C_ID#MSVC
#COMPILER_C_PATH#C:/opt/vs2026/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
#COMPILER_CXX_HASH#3c62be3c178526242f2c45cf8ccbe3c55048a1a8
#COMPILER_CXX_VERSION#19.44.35215.0
#COMPILER_CXX_ID#MSVC
#COMPILER_CXX_PATH#C:/opt/vs2026/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
-- Configuring done (0.7s)
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
_VCPKG_ROOT_DIR
-- Build files have been written to: C:/tmp/vcpkg/buildtrees/detect_compiler/x64-windows-rel
Describe the bug
VS 2026 insider is available now, I'm using cmake built with VS2026 support (master branch of https://gitlab.kitware.com/cmake/cmake - version 4.2 is not released yet) which is working properly with VS2026 in my testing, but even when I set VCPKG_VISUAL_STUDIO_PATH vcpkg using 14.44 compiler instead of 14.50 (
C:\opt\vs2026\VC\Tools\MSVC\14.44.35207instead ofC:\opt\vs2026\VC\Tools\MSVC\14.50.35503in my setup)When I add
to triplet file I'm getting next error
Environment
To Reproduce
Steps to reproduce the behavior:
set(VCPKG_PLATFORM_TOOLSET v145)to triplets/x64-windows.cmakeUnable to find a valid Visual Studio instanceerrorExpected behavior
When VS 2026 used, v145 toolset supported and used by default
Failure logs
C:\tmp\vcpkg\buildtrees\detect_compiler\stdout-x64-windows.log