Closed zhuwei07 closed 3 weeks ago
Do I have to install vs in dir of C:\ ?
I can't solve the problem by installed the packages you list
vcpkg.exe install yaml-cpp --debug
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Using vcpkg-root: C:\dev\vcpkg
[DEBUG] Failed to open: C:\dev\vcpkg\vcpkg-bundle.json
[DEBUG] Bundle config: readonly=0, usegitregistry=0, embeddedsha=nullopt
[DEBUG] Using scripts-root: C:\dev\vcpkg\scripts
[DEBUG] Using downloads-root: C:\dev\vcpkg\downloads
[DEBUG] Using scripts-root: C:\dev\vcpkg\scripts
[DEBUG] Using builtin-ports: C:\dev\vcpkg\ports
[DEBUG] Using builtin-registry: C:\dev\vcpkg\versions
[DEBUG] Using installed-root: C:\dev\vcpkg\installed
[DEBUG] Using packages-root: C:\dev\vcpkg\packages
[DEBUG] Using buildtrees-root: C:\dev\vcpkg\buildtrees
[DEBUG] Default binary cache path is: C:\Users\Alden\AppData\Local\vcpkg\archives
Computing installation plan...
[DEBUG] Found path: C:\Users\Alden\scoop\shims\cmake.exe
[DEBUG] CreateProcessW("C:\Users\Alden\scoop\shims\cmake.exe" --version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 78434 us
[DEBUG] CreateProcessW("C:\Users\Alden\scoop\shims\cmake.exe" -DVCPKG_ROOT_DIR=C:/dev/vcpkg -DPACKAGES_DIR=C:/dev/vcpkg/packages -DBUILDTREES_DIR=C:/dev/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/dev/vcpkg/installed -DDOWNLOADS=C:/dev/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "C:\dev\vcpkg\buildtrees\0.vcpkg_tags.cmake")
[DEBUG] cmd_execute_and_stream_data() returned 0 after 68443 us
The following packages will be built and installed:
* vcpkg-cmake[core]:x64-windows -> 2021-12-05
* vcpkg-cmake-config[core]:x64-windows -> 2021-12-01
yaml-cpp[core]:x86-windows -> 0.7.0#1
Additional packages (*) will be modified to complete this operation.
[DEBUG] CreateProcessW("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -prerelease -legacy -products * -format xml)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 25352 us
**Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
D:\Program Files (x86)\Microsoft Visual Studio\2022\Professional\VC\Auxiliary/Build\vcvarsall.bat**
[DEBUG] D:\a\_work\1\s\src\vcpkg\vcpkgpaths.cpp(1347)
[DEBUG] Time in subprocesses: 172229 us
[DEBUG] Time in parsing JSON: 41 us
[DEBUG] Time in JSON reader: 63 us
[DEBUG] Time in filesystem: 2218 us
[DEBUG] Time in loading ports: 502 us
[DEBUG] Exiting after 195.8 ms (185601 us)
@JackBoosY this problem has bothered me for a long time
below is the result of vswhere.exe
<?xml version="1.0"?>
<instances>
<instance>
<instanceId>bd204dce</instanceId>
<installDate>2021-12-28T15:14:02Z</installDate>
<installationName>VisualStudio/17.0.4+32014.148</installationName>
<installationPath>D:\Program Files (x86)\Microsoft Visual Studio\2022\Professional</installationPath>
<installationVersion>17.0.32014.148</installationVersion>
<productId>Microsoft.VisualStudio.Product.Professional</productId>
<productPath>D:\Program Files (x86)\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe</productPath>
<state>4294967295</state>
<isComplete>1</isComplete>
<isLaunchable>1</isLaunchable>
<isPrerelease>0</isPrerelease>
<isRebootRequired>0</isRebootRequired>
<displayName>Visual Studio Professional 2022</displayName>
<description>为小型团队量身定制的专业 IDE</description>
<channelId>VisualStudio.17.Release</channelId>
<channelUri>https://aka.ms/vs/17/release/channel</channelUri>
<enginePath>C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service</enginePath>
<releaseNotes>https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.0#17.0.4</releaseNotes>
<thirdPartyNotices>https://go.microsoft.com/fwlink/?LinkId=661288</thirdPartyNotices>
<updateDate>2021-12-28T15:14:02.6141847Z</updateDate>
<catalog>
<buildBranch>d17.0</buildBranch>
<buildVersion>17.0.32014.148</buildVersion>
<id>VisualStudio/17.0.4+32014.148</id>
<localBuild>build-lab</localBuild>
<manifestName>VisualStudio</manifestName>
<manifestType>installer</manifestType>
<productDisplayVersion>17.0.4</productDisplayVersion>
<productLine>Dev17</productLine>
<productLineVersion>2022</productLineVersion>
<productMilestone>RTW</productMilestone>
<productMilestoneIsPreRelease>False</productMilestoneIsPreRelease>
<productName>Visual Studio</productName>
<productPatchVersion>4</productPatchVersion>
<productPreReleaseMilestoneSuffix>1.0</productPreReleaseMilestoneSuffix>
<productSemanticVersion>17.0.4+32014.148</productSemanticVersion>
<requiredEngineVersion>3.0.4496.34889</requiredEngineVersion>
</catalog>
<properties>
<campaignId>1</campaignId>
<channelManifestId>VisualStudio.17.Release/17.0.4+32014.148</channelManifestId>
<nickname></nickname>
<setupEngineFilePath>C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe</setupEngineFilePath>
</properties>
</instance>
</instances>```
Please check the following Visual Studio components in Visual Studio Installer:
Please ensure you've installed the following Visual Studio Components using
Visual Studio Installer:
- Windows Universal C Runtime
- C++ Build Tools core features
- Visual Studio Build tools:
* VC++ 2017 version ... latest v141 tools (for Visual Studio 2017)
* MSVC v142 - VS 2019 C++ x64/x86 build tools (for Visual Studio 2019)
* MSVC v143 - VS 2022 C++ x64/x86 build tools (for Visual Studio 2022)
- MSBuild
- Windows SDK
- English language Pack
For ARM / ARM64 or UWP triplet, please also installed:
- Visual Studio Build tools for ARM:
* VC++ 2017 version ... Libs for Spectre (ARM) (for Visual Studio 2017)
* MSVC v142 - VS 2019 C++ ARM build tools (for Visual Studio 2019)
* MSVC v143 - VS 2022 C++ ARM build tools (for Visual Studio 2022)
- Visual Studio Build tools for ARM64:
* VC++ 2017 version ... Libs for Spectre (ARM64) (for Visual Studio 2017)
* MSVC v142 - VS 2019 C++ ARM64 build tools (for Visual Studio 2019)
* MSVC v143 - VS 2022 C++ ARM64 build tools (for Visual Studio 2022)
- Visual Studio Build tools for UWP:
* Visual C++ runtime for UWP (for Visual Studio 2017)
* C++ Universal Windows Platform support for v142 build tools (for Visual Studio 2019)
* C++ Universal Windows Platform support for v143 build tools (for Visual Studio 2022)
I'm sure I have installed:
But, how to check fellows:
I have installed it
Please note that vcpkg will choose the newer Visual Studio.
Can you make sure whether this path is exist: D:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary/Build\vcvarsall.bat
I have installed the newest vs2022 And D:\Program Files (x86)\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build has vcvarsall.bat
I think your Visual Studio is broken, please repair it using Visual Studio Installer.
It still doesn't work after repairing
@zhuwei07 What's the version of your VCPKG? If you are not using the latest vcpkg, I suggest trying it.
And please double confirm you've installed the English language pack.
I have checked the six features.
Please git pull vcpkg and rerun bootstrap script then try agian.
@zhuwei07 What's the version of your VCPKG? If you are not using the latest vcpkg, I suggest trying it.
I have got the latest vcpkg. when I update the vcpkg, the problem happened.
Can you please use powershell instead?
cc @BillyONeal do you know why? Is this related to the non-default installation path?
I installed to the default path, it works!!!
I installed to the default path, it works!!!
Of couse it works, but the problem is the non-default path doesn't work.
Found path: C:\Users\Alden\scoop\shims\cmake.exe
scoop is a possible source of problems in vcpkg: https://github.com/microsoft/vcpkg/issues/25528#issuecomment-1174217103
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
This is from 2021! Thanks.
.\vcpkg.exe install yaml-cpp:x86-windows Computing installation plan... The following packages will be built and installed:
I have installed the vc2019