Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: find visual studio arm64 support #1

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/find-visualstudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ VisualStudioFinder.prototype = {
// Invoke the PowerShell script to get information about Visual Studio 2017
// or newer installations
findVisualStudio2017OrNewer: function findVisualStudio2017OrNewer (cb) {
var ps = path.join(process.env.SystemRoot, 'System32',
// SysWOW64 PowerShell is needed on ARM64 because of the COM classes and
// interfaces used by Find-VisualStudio.cs, which are not registered for
// being used from ARM64 processes.
var systemDirectory = process.arch === 'arm64' ? 'SysWOW64' : 'System32'
var ps = path.join(process.env.SystemRoot, systemDirectory,
'WindowsPowerShell', 'v1.0', 'powershell.exe')
var csFile = path.join(__dirname, 'Find-VisualStudio.cs')
var psArgs = [
Expand Down