HarbourMasters / HarbourMasters/Shipwright

Visual Studio 2026 fails configuration of CMake project when vcpkg is already provided by Visual studio

Open
#6,133 0 comments 0 reactions 1 assignee Claimed by @Malkierian View on GitHub
cmake
Dominant language
C
Stars
5.4k
Forks
837
Avg merge
1d 9h
Merged PRs (30d)
72

Description

How to reproduce:

- Install Visual Studio 2026 with `Desktop development with C++` which includes vcpkg
- Clone this repo
- Open this CMake project and configure it
- It fails

The reason it fails is it tries to download the git repo of vcpkg into the Visual Studio installation and aborts as it is not a git repo.

Workaround:
- Go into Visual Studio Installer
- Remove vcpkg component

Here is the CMake log file:

```
1> CMake generation started for default configuration: 'x64-Debug'.
1> Command line: "C:\Windows\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\18\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\Paul Schwabauer\source\repos\koplas\Shipwright\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\18\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\Users\Paul Schwabauer\source\repos\koplas\Shipwright" 2>&1"
1> Working directory: C:\Users\Paul Schwabauer\source\repos\koplas\Shipwright\out\build\x64-Debug
1> [CMake] -- The C compiler identification is MSVC 19.50.35721.0
1> [CMake] -- The CXX compiler identification is MSVC 19.50.35721.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] Suppressing warnings in LUS and src
1> [CMake] fatal: No names found, cannot describe anything.
1> [CMake] -- Check size of void*
1> [CMake] -- Check size of void* - done
1> [CMake] -- Using Vcpkg triplet 'x64-windows'
1> [CMake] -- Auto-updating vcpkg in C:\Program Files\Microsoft Visual Studio\18\Community\VC\vcpkg
1> [CMake] fatal: not a git repository (or any of the parent directories): .git
1> [CMake] CMake Error at CMake/automate-vcpkg.cmake:131 (message):
1> [CMake] ***** FATAL ERROR: Could not clone vcpkg *****
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMake/automate-vcpkg.cmake:94 (_install_or_update_vcpkg)
1> [CMake] CMakeLists.txt:88 (vcpkg_bootstrap)
1> [CMake] -- Configuring incomplete, errors occurred!
1> 'C:\Windows\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\18\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\Paul Schwabauer\source\repos\koplas\Shipwright\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\18\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\Users\Paul Schwabauer\source\repos\koplas\Shipwright" 2>&1"' execution failed with error: ''C:\Windows\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\18\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\Paul Schwabauer\source\repos\koplas\Shipwright\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\18\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\Users\Paul Schwabauer\source\repos\koplas\Shipwright" 2>&1"' returned with exit code: 1'.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.