Open Ssspade opened 2 years ago
Hi! I'm facing the same issue in a similar environment, trying to install any package. Some comments:
vcpkg
to install libraries for lacking headers.Please, should modify the triplet x86-windows.cmake
? How? Should we create a new one? I don't even know for that triplet if we are working in a 64bits environment.
Please, should we install and configure CMake?
Sorry, I'm a bit lost. Thanks for your help!
Visua lStudio Installer->installed version->modify-> Language package->add English package, can resolve this problem
Is this issue resolved?
I am having a similar problem. "Could not locate a complete Visual Studio instance" although it is installed. I tried to use vcpkg to install catch2. English langauge package is already installed... Any other suggestions how to resolve this? I hope it is fine I write here, I think it is the same issue...
I have the same problem, I use VS CODE to compile, but now there is a problem with installing the egin3 pakage.
@KevinShu-AEUST Please see the required Visual Studio components in https://github.com/microsoft/vcpkg-tool/pull/314.
@KevinShu-AEUST請在microsoft/vcpkg-tool#314中查看需要的Visual Studio組件。
sorry,I don't understand the solution for this post.
You can use this simple tool to find out the VS instances on your box, including your SDKs:
你可以使用這個簡單的工具來了解你的機器上的 VS 實例,你的 SDK
I should to download pkg --mgr.exe 嗎?
@KevinShu-AEUST Sorry, I don't quite understand your question!
@KevinShu-AEUST Sorry, I don't quite understand your question! Sorry, I don't know the relevant cmd commands very well, and I'm still researching.
@KevinShu-AEUST https://github.com/mingw-io/pkg-mgr
Please use Visual Studio Installer to install the following Visual Studio components:
C++:
Microsoft.VisualStudio.Component.Windows10SDK
Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core
Microsoft.VisualStudio.Component.VC.140
(for Visual Studio 2015)Microsoft.VisualStudio.Component.VC.Tools.x86.x64
(for Visual Studio 2017 or later)Microsoft.Component.MSBuild
Microsoft.VisualStudio.Component.Windows81SDK
Microsoft.VisualStudio.Component.Windows10SDK.18362
Microsoft.VisualStudio.Component.Windows10SDK.19041
Microsoft.VisualStudio.Component.Windows10SDK.20348
Microsoft.VisualStudio.Component.Windows11SDK.22000
ARM/ARM64:
Microsoft.VisualStudio.Component.VC.Tools.arm
Microsoft.VisualStudio.Component.VC.Tools.arm64
UWP:
Microsoft.VisualStudio.ComponentGroup.UWP.VC
Edit: cmake tool in Visual Studio Installer is also needed.
Is there any solution to purely run vcpkg with the EWDK? Am not able to install VS on this machine and rely on CLion which works fine with EWDK and EWDK is sufficient to build all my projects so I would like to keep a static install out of this system.
Setting the ENV before running vcpkg doesn't work, but as far as I can tell the EWDK should have everything required to build the packages.
Error: in triplet x64-windows-static: 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:
E:\Program Files\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary/Build\vcvarsall.bat
Установка английского языка помогла
@S0PEX No, currently vcpkg needs Visual Studio core desktop features.
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:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary/Build\vcvarsall.bat
Visual Studio is installed in C:\Program Files\Microsoft Visual Studio\2022 - I don't understand what is the problem?
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: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary/Build\vcvarsall.bat
Visual Studio is installed in C:\Program Files\Microsoft Visual Studio\2022 - I don't understand what is the problem?
Can you please view my comment and have a try?
Thanks.
I found a solution for me installing the C++ visual studio toolchain onto my C drive worked though it doesn't work when I install Visual studio on my E drive.
@nikinov Installing Visual Studio to a non-system disk doesn't affect vcpkg, maybe because of a problem with its environment variable settings.
Same prob here :(
@HaifaBenHsouna See the required Visual Studio components in https://github.com/microsoft/vcpkg/issues/22074#issuecomment-1022840591.
Please use Visual Studio Installer to install the following Visual Studio components:
1. C++: * Windows Universal C Runtime: `Microsoft.VisualStudio.Component.Windows10SDK` * C++ core desktop features: `Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core` * Visual Studio Build tools: * `Microsoft.VisualStudio.Component.VC.140` (for Visual Studio 2015) * `Microsoft.VisualStudio.Component.VC.Tools.x86.x64` (for Visual Studio 2017 or later) * MSBuild: `Microsoft.Component.MSBuild` * Windows SDK (one of them): * 8.1: `Microsoft.VisualStudio.Component.Windows81SDK` * 10.0.18362: `Microsoft.VisualStudio.Component.Windows10SDK.18362` * 10.0.19041: `Microsoft.VisualStudio.Component.Windows10SDK.19041` * 10.0.20348: `Microsoft.VisualStudio.Component.Windows10SDK.20348` * 11.0.22000: `Microsoft.VisualStudio.Component.Windows11SDK.22000` 2. ARM/ARM64: * Visual Studio Build tools for ARM: `Microsoft.VisualStudio.Component.VC.Tools.arm` * Visual Studio Build tools for ARM: `Microsoft.VisualStudio.Component.VC.Tools.arm64` 3. UWP: * Visual Studio Build tools for UWP: `Microsoft.VisualStudio.ComponentGroup.UWP.VC`
Not worked with me
@AndroTwrpid Can you please provide the Visual Studio components list you installed and the failure output / logs?
Thanks!
@AndroTwrpid Can you please provide the Visual Studio components list you installed and the failure output / logs?
Thanks!
@JackBoosY I've got the required components from your list installed.
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.Static.Analysis.Tools",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.VisualStudio.Component.PortableLibrary",
"Microsoft.Net.Component.4.6.1.SDK",
"Microsoft.Net.Component.4.6.1.TargetingPack",
"Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
"Microsoft.Component.ClickOnce",
"Microsoft.VisualStudio.Component.SQL.CLR",
"Microsoft.VisualStudio.Component.VisualStudioData",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.Component.ManagedDesktop.Core",
"Microsoft.Net.Component.4.5.TargetingPack",
"Microsoft.Net.Component.4.5.2.TargetingPack",
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.VisualStudio.Component.FSharp",
"Microsoft.Net.Core.Component.SDK.2.1",
"Microsoft.NetCore.ComponentGroup.DevelopmentTools.2.1",
"Microsoft.VisualStudio.Component.IISExpress",
"Microsoft.VisualStudio.Component.TypeScript.3.1",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
"Microsoft.VisualStudio.Component.JavaScript.TypeScript",
"Component.WebSocket",
"Microsoft.VisualStudio.Component.JavaScript.Diagnostics",
"Component.Microsoft.VisualStudio.RazorExtension",
"Microsoft.VisualStudio.Component.SQL.ADAL",
"Microsoft.VisualStudio.Component.SQL.NCLI",
"Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime",
"Microsoft.VisualStudio.Component.Common.Azure.Tools",
"Microsoft.VisualStudio.Component.SQL.CMDUtils",
"Microsoft.VisualStudio.Component.SQL.SSDT",
"Microsoft.VisualStudio.Component.SQL.DataSources",
"Component.Microsoft.Web.LibraryManager",
"Microsoft.VisualStudio.ComponentGroup.Web",
"Microsoft.VisualStudio.Component.DockerTools.BuildTools",
"Microsoft.VisualStudio.Component.DockerTools",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Graphics.Win81",
"Microsoft.VisualStudio.Component.Graphics.Tools",
"Microsoft.VisualStudio.Component.VC.DiagnosticTools",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest",
"Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest",
"Microsoft.Component.VC.Runtime.UCRTSDK",
"Microsoft.VisualStudio.Component.Windows81SDK",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81",
"Microsoft.VisualStudio.Component.VC.ATLMFC",
"Microsoft.VisualStudio.Component.Windows10SDK.17134",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Component.FSharp.WebTemplates",
"Microsoft.NetCore.ComponentGroup.Web.2.1",
"Microsoft.VisualStudio.Component.Windows10SDK",
"Microsoft.VisualStudio.Component.TestTools.Core",
"Microsoft.VisualStudio.Workload.NetCoreTools"
]
}
Running vcpkg install from inside the actual x64 Native Tools Command Prompt for VS 2017
, it still complains it can't find it lol:
C:\Users\kwu\repos\vcpkg>vcpkg install aws-sdk-cpp[s3,sqs]:x64-windows-static-vc141
Computing installation plan...
The following packages will be built and installed:
* aws-c-auth[core]:x64-windows-static-vc141 -> 0.6.3#2
* aws-c-cal[core]:x64-windows-static-vc141 -> 0.5.12#2
* aws-c-common[core]:x64-windows-static-vc141 -> 0.6.9#2
* aws-c-compression[core]:x64-windows-static-vc141 -> 0.2.14#2
* aws-c-event-stream[core]:x64-windows-static-vc141 -> 0.2.7#2
* aws-c-http[core]:x64-windows-static-vc141 -> 0.6.5#2
* aws-c-io[core]:x64-windows-static-vc141 -> 0.10.7#2
* aws-c-mqtt[core]:x64-windows-static-vc141 -> 0.7.6#3
* aws-c-s3[core]:x64-windows-static-vc141 -> 0.1.25#2
* aws-checksums[core]:x64-windows-static-vc141 -> 0.1.11#3
* aws-crt-cpp[core]:x64-windows-static-vc141 -> 0.15.1#3
aws-sdk-cpp[core,dynamodb,kinesis,s3,sqs]:x64-windows-static-vc141 -> 1.9.160#1
* openssl[core]:x64-windows-static-vc141 -> 1.1.1n
* vcpkg-cmake[core]:x64-windows -> 2022-01-19
* vcpkg-cmake-config[core]:x64-windows -> 2022-02-06
* zlib[core]:x64-windows-static-vc141 -> 1.2.11#13
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Error: in triplet x64-windows-static-vc141: Unable to find a valid Visual Studio instance
with toolset version vc141
The following Visual Studio instances were considered:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional
The following paths were examined for Visual Studio instances:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary/Build\vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools/MSVC\14.29.30037\bin/HostX86/x86\dumpbin.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools/MSVC\14.16.27023\bin/HostX86/x86\dumpbin.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary/Build\vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools/MSVC\14.16.27023\bin/HostX86/x86\dumpbin.exe
C:\Users\kwu\repos\vcpkg>dir "c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat"
Volume in drive C has no label.
Volume Serial Number is 7655-EC2B
Directory of c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build
07/01/2021 07:40 PM 9,889 vcvarsall.bat
1 File(s) 9,889 bytes
0 Dir(s) 74,271,522,816 bytes free
C:\Users\kwu\repos\vcpkg>
FWIW, here's the triplet I'm using:
C:\Users\kwu\repos\vcpkg>type triplets\x64-windows-static-vc141.cmake
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_PLATFORM_TOOLSET vc141)
C:\Users\kwu\repos\vcpkg>
And vcpkg version:
C:\Users\kwu\repos\vcpkg>git rev-parse HEAD
6f827f25f74033593aee7044f9532bf3abdf7b6b
Volume in drive C has no label.
@wuziq Please set a label to your system disk then try again. See https://stackoverflow.com/questions/60422938/calling-dir-in-cmd-prints-out-volume-in-drive-c-has-no-label
Volume in drive C has no label.
@wuziq Please set a label to your system disk then try again. See https://stackoverflow.com/questions/60422938/calling-dir-in-cmd-prints-out-volume-in-drive-c-has-no-label
Made no difference. I'd be surprised if it did!
C:\Users\kwu\repos\vcpkg>vcpkg install aws-sdk-cpp[s3,sqs]:x64-windows-static-vc141
Computing installation plan...
The following packages will be built and installed:
* aws-c-auth[core]:x64-windows-static-vc141 -> 0.6.3#2
* aws-c-cal[core]:x64-windows-static-vc141 -> 0.5.12#2
...
* zlib[core]:x64-windows-static-vc141 -> 1.2.11#13
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Error: in triplet x64-windows-static-vc141: Unable to find a valid Visual Studio instance
at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional"
with toolset version vc141
The following Visual Studio instances were considered:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional
The following paths were examined for Visual Studio instances:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary/Build\vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools/MSVC\14.29.30037\bin/HostX86/x86\dumpbin.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools/MSVC\14.16.27023\bin/HostX86/x86\dumpbin.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary/Build\vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools/MSVC\14.16.27023\bin/HostX86/x86\dumpbin.exe
C:\Users\kwu\repos\vcpkg>dir
Volume in drive C is potato
Volume Serial Number is 7655-EC2B
Directory of C:\Users\kwu\repos\vcpkg
03/01/2022 05:23 PM <DIR> .
03/01/2022 05:23 PM <DIR> ..
03/01/2022 01:04 PM 141 .gitattributes
03/01/2022 01:04 PM <DIR> .github
03/01/2022 01:04 PM 5,559 .gitignore
...
Could you pleasee use set(VCPKG_PLATFORM_TOOLSET v141) instead of set(VCPKG_PLATFORM_TOOLSET vc141)?
Nope not environment variables
select and install "Visual C++ tools for CMake" in the Visual Studio Installer
@Ssspade Is this issue resolved?
mine got fixed after downloading the C++ CMake tools for Windows
in visual studio installer
Thanks for posting this issue. Please reopen this issue if it still be a problem for you.
Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
at "D:\VS19\Enterprise"
The following Visual Studio instances were considered:
D:\VS19\NuGet
The following paths were examined for Visual Studio instances:
D:\VS19\NuGet\VC\Auxiliary/Build\vcvarsall.bat
D:\VS19\NuGet\VC\Tools/MSVC\14.20.27508\bin/HostX86/x86\dumpbin.exe
I have alike problem. Actually vcpkg worked fine untill I installed NuGet plugin via Build Tools. Tried all lf the above advices, changing VCPKG_VISUAL_STUDIO_PATH, but nothing helps.
Also, don't install VS 2019 Build Tools separately if VS 2019 Community or Enterprise is already present, vcpkg detection will get confused
Hi, I've also got similar problem, and fixed it by installing "Desktop development with C++", even if i only want to use vs to develop linux apps.
... even if i only want to use vs to develop linux apps.
You will need a full toolchain for the host triplet (for some binary host tools such pkgconf
).
It's just a bug in Vcpkg itself, download new exe and it will work.
So many users wasted time fixing own Visual Studio installation, while actual bug was on Microsoft side.
with NEW exe
removing trailing slash from VCPKG_VISUAL_STUDIO_PATH helps (so instead of E:\...\VS\
it becomes E:\...\VS
)
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:
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary/Build\vcvarsall.bat
Checking the path C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary
does not contain Build
directory but the one in \Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary
does.
It's just a bug in Vcpkg itself, download new exe and it will work. So many users wasted time fixing own Visual Studio installation, while actual bug was on Microsoft side.
with NEW exe
This helped me. Install the new VS 2020 and C++ CMake tools for Windows
.
Same here, I don't know if it's because I'm installing visual studio build tools in an unconventional location:
# Visual Studio build tools
Write-Host "Installing visual studio build tools..." -ForegroundColor Cyan
cd $env:USERPROFILE
$exePath = "$env:TEMP\vs.exe"
Invoke-WebRequest -Uri https://aka.ms/vs/17/release/vs_BuildTools.exe -UseBasicParsing -OutFile $exePath
Write-Host "layout..." -ForegroundColor Cyan
Start-Process $exePath -ArgumentList "--layout .\vs_BuildTools --quiet" -Wait
cd vs_BuildTools
Write-Host "actual installation..." -ForegroundColor Cyan
Start-Process vs_setup.exe -ArgumentList "--installPath $env:USERPROFILE\vs_BuildTools2022 --nocache --wait --noUpdateInstaller --noWeb --allWorkloads --includeRecommended --includeOptional --quiet --norestart" -Wait
[Environment]::SetEnvironmentVariable('Path', "$([Environment]::GetEnvironmentVariable('Path', 'Machine'));$env:USERPROFILE\vs_BuildTools2022", 'Machine')
I get
error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Visual studio install -> Modify -> Install 'Desktop Development with c++' Solved the issue for me!
I also had this error message
error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
I was not able to resolve it using Visual Studio Code and C++ Extension Pack.
Instead I installed Visual Studio.
winget install Microsoft.VisualStudio.2022.Community --interactive
And during the installation process I selected as workload the "Desktop Development with C++". After reboot (recommended by installer) the issue was resolved for me.
💡: I had an incomplete build configuration for my project. I had to manually delete it and generate it again. I am using the Manifest Mode.
I gave up since I can’t fix it. I tried everything.
Da: David Hebbeker @.> Inviato: giovedì 10 novembre 2022 11:55 A: microsoft/vcpkg @.> Cc: Paul Kotrik @.>; Mention @.> Oggetto: Re: [microsoft/vcpkg] vcpkg install error:in triplet x64-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance (Issue #22074)
I also had this error message
error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
I was not able to resolve it using Visual Studio Code and C++ Extension Pack.
Instead I installed Visual Studio.
winget install Microsoft.VisualStudio.2022.Community --interactive
And during the installation process I selected as workload the "Desktop Development with C++". After reboot (recommended by installer) the issue was resolved for me.
💡: I had an incomplete build configuration for my project. I had to manually delete it and generate it again. I am using the Manifest Modehttps://vcpkg.io/en/docs/users/manifests.html.
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vcpkg/issues/22074#issuecomment-1310105006, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APCPDKRPH7T3TFTKU6Y3O4LWHTIAVANCNFSM5KKK5O6Q. You are receiving this because you were mentioned.Message ID: @.**@.>>
This is becoming more & more embarrassing! Please, try some other alternatives!
Describe the bug A clear and concise description of what the bug is. When using vcpkg install, an error occurred: in triplet x64-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance
Environment
- OS: Windows10,x86_64
- Compiler: Visual Studio Code
To Reproduce Steps to reproduce the behavior:
- .\vcpkg install thrift
- See error Error: in triplet x86-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance
Describe the bug A clear and concise description of what the bug is. When using vcpkg install, an error occurred: in triplet x64-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance
Environment
- OS: Windows10,x86_64
- Compiler: Visual Studio Code
To Reproduce Steps to reproduce the behavior:
- .\vcpkg install thrift
- See error Error: in triplet x86-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance
Same issues I was facing last 2 day everything try, but it's fix within few minutes only one step main download this Visual Studio
Describe the bug A clear and concise description of what the bug is. When using vcpkg install, an error occurred: in triplet x64-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance
Environment
To Reproduce Steps to reproduce the behavior: