vcpkg "Could not locate a manifest (vcpkg.json)" in CI
In manifest mode vcpkg install (with no package arguments) walks up from the working directory looking for a vcpkg.json and found none. Either the manifest is missing, not checked out, or the step runs from the wrong directory.
What this error means
vcpkg install fails with "error: Could not locate a manifest (vcpkg.json) above the current working directory." No packages are installed.
error: Could not locate a manifest (vcpkg.json) above the current working directory.
This vcpkg distribution does not have a classic mode instance.Common causes
No vcpkg.json in the working directory tree
Manifest mode needs a vcpkg.json; the step runs where none exists, or the manifest lives in a subdirectory not on the path upward.
The manifest was not checked out
A sparse checkout or an uncommitted vcpkg.json means the file is absent on the runner.
How to fix it
Run install from the manifest directory
Invoke vcpkg where the vcpkg.json lives, or use CMake toolchain integration that finds it automatically.
- run: vcpkg install
working-directory: ${{ github.workspace }}Confirm the manifest is committed
- Add
ls vcpkg.jsonbefore the install step to prove it is present. - Commit
vcpkg.jsonand anyvcpkg-configuration.json. - Ensure the checkout does not exclude the manifest.
How to prevent it
- Commit
vcpkg.jsonat the repo or project root. - Set the vcpkg step working-directory to the manifest folder.
- Prefer the CMake toolchain integration so the manifest is discovered on configure.