Vcpkg: bootstrap-vcpkg Batch file triggers an error and is unable to install the libraries

Created on 25 Jul 2020  路  3Comments  路  Source: microsoft/vcpkg

PS C:\src\vcpkg> .\bootstrap-vcpkg.bat
The property 'instance' cannot be found on this object. Verify that the property exists.
At C:\src\vcpkg\scripts\bootstrap.ps1:78 char:31

  • foreach ($instance in $asXml.instances.instance)
  • ~~~~~

    • CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException

    • FullyQualifiedErrorId : PropertyNotFoundStrict

Could not find Visual Studio. VS2015, VS2017, or VS2019 (with C++) needs to be installed.
At C:\src\vcpkg\scripts\bootstrap.ps1:143 char:9

  • throw "Could not find Visual Studio. VS2015, VS2017, or VS201 ...
  • ~~~~~~~~~~~~~

    • CategoryInfo : OperationStopped: (Could not find ...o be installed.:String) [], RuntimeException

    • FullyQualifiedErrorId : Could not find Visual Studio. VS2015, VS2017, or VS2019 (with C++) needs to be installed.

I tried executing the batch file in powershell (Admin), but the batch file triggers an error like this every time I tried

question

Most helpful comment

@saketh023

  • Which Version of Windows do you have?
  • I must be Windows 7, 8, 8.1 or 10.
  • Which version Visual Studio do you have installed?
  • Visual Studio Code will _NOT_ work, it must be Visual Studio 2015 with update 3, Visual Studio 2017 or 2019.
  • The _Community_ versions of Visual Studio 2017/2019 are free https://visualstudio.microsoft.com/ and with a fully functional compiler/linker.
  • You must have the Desktop workload, the English Language Pack and Windows SDK 8.1 or later.
  • You can install your own version of Git or let vcpkg download the portable version once it is built https://git-scm.com/downloads .
  • Reference https://github.com/microsoft/vcpkg#quick-start-windows

If I mistakenly thought you are using windows and you actually are using a *NIX OS, aka linux in a Virtual Machine or via WSL/WSL2 reference: https://github.com/microsoft/vcpkg#quick-start-unix

All 3 comments

@saketh023

  • Which Version of Windows do you have?
  • I must be Windows 7, 8, 8.1 or 10.
  • Which version Visual Studio do you have installed?
  • Visual Studio Code will _NOT_ work, it must be Visual Studio 2015 with update 3, Visual Studio 2017 or 2019.
  • The _Community_ versions of Visual Studio 2017/2019 are free https://visualstudio.microsoft.com/ and with a fully functional compiler/linker.
  • You must have the Desktop workload, the English Language Pack and Windows SDK 8.1 or later.
  • You can install your own version of Git or let vcpkg download the portable version once it is built https://git-scm.com/downloads .
  • Reference https://github.com/microsoft/vcpkg#quick-start-windows

If I mistakenly thought you are using windows and you actually are using a *NIX OS, aka linux in a Virtual Machine or via WSL/WSL2 reference: https://github.com/microsoft/vcpkg#quick-start-unix

Hi @saketh023
Thanks for posting this issue.
Have you installed Visual Studio on your machine? please make sure the version is 2015 update 3 or greater.

@StarGate-One
Thanks for your help.

I reinstalled visual studio 2019 community edition. I also have Visual Studio Code installed long back.
This time the batch file worked...!
Thanks for your time and help @StarGate-One and @NancyLi1013 !
馃槉馃槉馃槉

Was this page helpful?
0 / 5 - 0 ratings