This will look for Visual Studio in the Correct directory. (#143479)

* Specified the address of 'Microsoft Visual Studio' depending upon the system architect

* Changed preinstall to look for Visual Studio in the correct directory

* Updated preinstall.js to look for VS in the correct directory
This commit is contained in:
Rounak singh 2022-02-28 14:22:56 +05:30 committed by GitHub
parent 6a74402c7f
commit d35ee52e1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,6 +63,17 @@ function hasSupportedVisualStudioVersion() {
break;
}
const programFiles86Path = process.env['ProgramFiles(x86)'];
const programFiles64Path = process.env['ProgramFiles'];
if (programFiles64Path) {
vsPath = `${programFiles64Path}/Microsoft Visual Studio/${version}`;
const vsTypes = ['Enterprise', 'Professional', 'Community', 'Preview', 'BuildTools'];
if (vsTypes.some(vsType => fs.existsSync(path.join(vsPath, vsType)))) {
availableVersions.push(version);
break;
}
}
if (programFiles86Path) {
vsPath = `${programFiles86Path}/Microsoft Visual Studio/${version}`;
const vsTypes = ['Enterprise', 'Professional', 'Community', 'Preview', 'BuildTools'];