fix: do not pass args to msvc choco

This commit is contained in:
Amin Yahyaabadi 2021-12-05 09:15:43 -06:00
parent a381fc0e98
commit 313d3ece41
1 changed files with 3 additions and 13 deletions

View File

@ -23,11 +23,7 @@ export async function setupMSVC(
try { try {
if (version === "2015") { if (version === "2015") {
toolset = "14.0.25420.1" toolset = "14.0.25420.1"
await setupChocoPack("visualcpp-build-tools", toolset, [ await setupChocoPack("visualcpp-build-tools", toolset, [])
"--ignore-dependencies",
"--params",
"'/IncludeRequired'",
])
VCTargetsPath = "C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140" VCTargetsPath = "C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140"
if (existsSync(VCTargetsPath)) { if (existsSync(VCTargetsPath)) {
@ -35,17 +31,11 @@ export async function setupMSVC(
} }
} else if (version === "2017") { } else if (version === "2017") {
toolset = "14.16" toolset = "14.16"
await setupChocoPack("visualstudio2017buildtools", "15.9.41.0", [ await setupChocoPack("visualstudio2017buildtools", "15.9.41.0", [])
"--package-parameters",
"'--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive'",
])
// VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16" // TODO verify path // VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16" // TODO verify path
} else if (version === "2019") { } else if (version === "2019") {
toolset = "14.29" toolset = "14.29"
await setupChocoPack("visualstudio2019buildtools", "16.11.7.0", [ await setupChocoPack("visualstudio2019buildtools", "16.11.7.0", [])
"--package-parameters",
"'--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive'",
])
// VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133" // VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133"
} }
} catch (e) { } catch (e) {