vcpkg baseline "does not match" error in CI
Manifest mode pins a builtin-baseline commit that vcpkg uses to resolve port versions. If the vcpkg registry checkout does not contain that commit, vcpkg cannot check it out and reports a baseline mismatch.
What this error means
vcpkg install fails with "error: while checking out baseline <sha>" or "the baseline ... does not match", often after a shallow clone of the vcpkg registry.
vcpkg
error: while checking out baseline from commit '7e3d3beac5ca6fe8aab4599d4e1d8ce270ccf8e3'
This may be fixed by updating the baseline, or fetching the full history.Common causes
A shallow vcpkg clone lacks the baseline commit
The registry was cloned with limited history, so the pinned baseline commit is not present to check out.
A baseline that does not exist upstream
The builtin-baseline sha in vcpkg.json was mistyped or never merged, so no checkout can match it.
How to fix it
Fetch full vcpkg history
Ensure the vcpkg registry checkout has the commit the baseline pins.
Terminal
git -C "$VCPKG_ROOT" fetch --unshallow || git -C "$VCPKG_ROOT" fetch --depth=1000Update the baseline to a real commit
- Run
vcpkg x-update-baselineto set the baseline to the current registry commit. - Commit the updated
vcpkg.json. - Re-run install so the baseline resolves.
Terminal
vcpkg x-update-baseline --add-initial-baselineHow to prevent it
- Use
vcpkg x-update-baselineto set a baseline that exists upstream. - Avoid shallow-cloning the vcpkg registry when a pinned baseline is old.
- Commit the exact baseline your manifest resolves against.
Related guides
vcpkg "Could not locate a manifest (vcpkg.json)" in CIFix vcpkg "error: Could not locate a manifest (vcpkg.json) above the current working directory" in CI - vcpkg…
vcpkg install failed: triplet mismatch in CIFix vcpkg install failures from a triplet mismatch in CI - the requested triplet does not match the runner ar…
vcpkg "VCPKG_ROOT" not set / toolchain not found in CIFix vcpkg "VCPKG_ROOT" not set in CI - CMake or vcpkg cannot find the vcpkg installation because the env var…