This PR is an alternative to #28905 and reverts it.
To avoid toolset version incompatibilities, which result in errors like this:
0LINK : fatal error C1900: Il mismatch between 'P1' version '20230904' and 'P2' version '20221215' [D:\a\bitcoin\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
1LINK : fatal error LNK1257: code generation failed [D:\a\bitcoin\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
2LINK : fatal error LNK1327: failure during running link.exe [D:\a\bitcoin\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
it is enough to set it explicitly in the vcpkg triplet file (see the second commit). The VCToolsVersion
environment variable is set by the ilammy/msvc-dev-cmd
action.
Please note that the #28905 is not optimal:
I guess this is something we’ll just have to maintain forever? That’s a shame, because it also adds ~30% runtime to this CI job.