I am trying to set up a Windows Server-based CI to compile a VS project whose dependencies are managed by vcpkg; my container manager is Docker. I am using Window Server as a base (mcr.microsoft.com/windows/servercore:10.0.17763.5576).
I generated the container using VS Build Tool 2022, installing the compiler and adding vckpg as well; however, I am facing many difficulties preparing the container because of vcpkg.
When I try to compile the project in the host OS, everything works fine, and dependencies are correctly downloaded and linked. Conversely, when I run the vcpkg install command in the cloned repository inside the container, I get the error: “Could not locate a complete Visual Studio instance”. After the message, nothing is written, so vcpkg is not giving the list of environments it scanned.
I tried all sorts of fixes:
- I tried adding the workloads suggested here,
- I tried installing VS 2019 Community (with no success, the installer will silently refuse to install),
- I defined environment variables
VCPKG_VISUAL_STUDIO_PATH,VCPKG_ROOTto point, respectively, to the root folder of VS 2022 and vcpkg, - I tried the solution suggested here, with no luck.
Up to this point, I was unable to install the required dependencies.
Has someone solved this problem?