Skip to content

Commit

Permalink
fix(lib): find VC.Tools.ARM64 on arm64 machine
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Sep 30, 2024
1 parent e6f4ede commit 23c72f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/find-visualstudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class VisualStudioFinder {
version: process.env.VSCMD_VER,
packages: [
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
// Assume MSBuild exists. It will be checked in processing.
'Microsoft.VisualStudio.VC.MSBuild.Base'
]
Expand Down Expand Up @@ -429,11 +430,12 @@ class VisualStudioFinder {

// Helper - process toolset information
getToolset (info, versionYear) {
const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
const vcTools = process.arch === 'arm64' ? 'VC.Tools.ARM64' : 'VC.Tools.x86.x64'
const pkg = `Microsoft.VisualStudio.Component.${vcTools}`
const express = 'Microsoft.VisualStudio.WDExpress'

if (info.packages.indexOf(pkg) !== -1) {
this.log.silly('- found VC.Tools.x86.x64')
this.log.silly(`- found ${vcTools}`)
} else if (info.packages.indexOf(express) !== -1) {
this.log.silly('- found Visual Studio Express (looking for toolset)')
} else {
Expand Down

0 comments on commit 23c72f1

Please sign in to comment.