Skip to content
Latchkey

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.

vcpkg
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.

.github/workflows/ci.yml
- run: vcpkg install
  working-directory: ${{ github.workspace }}

Confirm the manifest is committed

  1. Add ls vcpkg.json before the install step to prove it is present.
  2. Commit vcpkg.json and any vcpkg-configuration.json.
  3. Ensure the checkout does not exclude the manifest.

How to prevent it

  • Commit vcpkg.json at 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.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →