Skip to content

[vcpkg] Visual Studio 2026 (v18) not recognized as a valid instance in Triplet x64-windows #49058

@blouflashdb

Description

@blouflashdb

Description:
When trying to install dependencies via manifest mode in Visual Studio 2026 (v18.1.1), vcpkg fails to recognize the Visual Studio instance as "complete", even though the C++ workload (v145) is fully installed and the compiler (cl.exe) is functional via the Developer Command Prompt.

Environment:

  • OS: Windows 11
  • Visual Studio Version: 2026 (v18.1.1 Professional)
  • Toolset: v145
  • vcpkg version: (The one bundled with VS 2026)
  • CMake version: 4.2.1 (System installed)

Steps to Reproduce:

  1. Open a project with a vcpkg.json in Visual Studio 2026.
  2. Ensure "Desktop development with C++" is installed.
  3. Attempt to Build/Restore.

Observed Behavior:
vcpkg exits with the following error:

error: in Triplet x64-windows: Es wurde keine gültige Visual Studio-Instanz gefunden
Es konnte keine vollständige Visual Studio-Instanz gefunden werden.
Die folgenden Pfade wurden für Visual Studio-Instanzen untersucht:
  C:\Program Files\Microsoft SQL Server Management Studio 21\Release\VC\Auxiliary/Build\vcvarsall.bat
  C:\Program Files\Microsoft Visual Studio\18\Professional\VC\Auxiliary/Build\vcvarsall.bat

Diagnostic Logs (relevant snippet):
The debug log shows that vswhere.exe is called but vcpkg fails to identify the VS 18.0 instance as valid immediately after:

[DEBUG] 1010: CreateProcessW("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -prerelease -legacy -products * -format xml)
[DEBUG] 1010: cmd_execute_and_stream_data() returned 0 after    47854 us
error: in Triplet x64-windows: Es wurde keine gültige Visual Studio-Instanz gefunden

Additional Context:

  • cl.exe works fine in the Developer Command Prompt (Version 19.50.35721).
  • Setting VCPKG_FORCE_SYSTEM_BINARIES=1 and using CMake 4.2.1 (which supports VS 2026) does not bypass the instance check.
  • Setting VCPKG_VISUAL_STUDIO_PATH manually does not resolve the "instance not complete" error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions