Skip to content

Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed. #12129

@OlafvdSpek

Description

@OlafvdSpek

I think the error message is just out-of-date, VS2019 is missing.
This was while the installer was upgrading my VS2019.

PS C:\vc\vcpkg> ./vcpkg upgrade
The following packages will be rebuilt:
  * icu[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
If you are sure you want to rebuild the above packages, run this command with the --no-dry-run option.
PS C:\vc\vcpkg> .\bootstrap-vcpkg.bat
The property 'instance' cannot be found on this object. Verify that the property exists.
At C:\VC\vcpkg\scripts\bootstrap.ps1:78 char:31
+         foreach ($instance in $asXml.instances.instance)
+                               ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException
    + FullyQualifiedErrorId : PropertyNotFoundStrict

Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed.
At C:\VC\vcpkg\scripts\bootstrap.ps1:143 char:9
+         throw "Could not find Visual Studio. VS2015 or VS2017 (with C ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Could not find ...o be installed.:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed.

PS C:\vc\vcpkg> .\bootstrap-vcpkg.bat
The property 'instance' cannot be found on this object. Verify that the property exists.
At C:\VC\vcpkg\scripts\bootstrap.ps1:78 char:31
+         foreach ($instance in $asXml.instances.instance)
+                               ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException
    + FullyQualifiedErrorId : PropertyNotFoundStrict

Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed.
At C:\VC\vcpkg\scripts\bootstrap.ps1:143 char:9
+         throw "Could not find Visual Studio. VS2015 or VS2017 (with C ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Could not find ...o be installed.:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed.

Metadata

Metadata

Assignees

Labels

category:vcpkg-bugThe issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions