Pin the port registry version with builtin-baseline
Pin every port to a known registry commit with builtin-baseline in vcpkg.json, so versions resolve the same way on every machine.
In manifest mode, vcpkg picks versions from its registry, and the registry moves. Without a baseline, "latest" means whatever your checkout of vcpkg happens to contain. The builtin-baseline field fixes the registry state to a commit.
{
"name": "demo",
"version": "1.0.0",
"builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc",
"dependencies": ["zlib", "fmt"]
}git -C "$VCPKG_ROOT" rev-parse HEAD
vcpkg install3426db05b996481ca31e95fff3734cf23e0f51bc
Detecting compiler hash for triplet x64-linux...
The following packages will be built and installed:
fmt:[email protected]
zlib:[email protected]Each version listed is the highest one the registry offered at that baseline. The baseline is the commit hash of the vcpkg repository, which vcpkg x-update-baseline --add-initial-baseline writes for you. It is required once you use version>= constraints or overrides, as described in versioning.
The hash above is only an example of a 40-character commit; yours comes from your own registry clone. Bump it deliberately and review the diff in the packages it changes, because a new baseline can move many ports at once.