Skip to content

Unable to yarn install with VS2022 build tools #138572

@JJRcop

Description

@JJRcop

Does this issue occur when all extensions are disabled?: N/A

  • VS Code Version: main @ 470cee7
  • OS Version: Windows 10 Home 21H1 19043.1348 Windows Feature Experience Pack 120.2212.3920.0

Steps to Reproduce:

  1. Don't have Visual Studio 2019 installed anywhere
  2. Install prerequisites including Node.js but don't install native c++ build tools
  3. Install Visual Studio Build Tools 2022 separately
  4. Attempt to run yarn install

Result:

Receive error from build\npm\preinstall.js:

Invalid C/C++ Compiler Toolchain. Please check https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites.

This is because Visual Studio Build Tools 2022 installs to C:\Program Files (x86)\Microsoft Visual Studio\2022, but build\npm\preinstall.js does not consider 2022 to be a supported version, only 2019 and 2017.

const supportedVersions = ['2019', '2017'];

I would prefer to save disk space and avoid installing Visual Studio Build Tools 2019 when I already have 2022 installed.

Metadata

Metadata

Assignees

Labels

electron-16-updateIssues related to electron 16 updateinsiders-releasedPatch has been released in VS Code Insidersvscode-buildVS Code build process issueswindowsVS Code on Windows issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions