fix: fix the toolset versions for vs2017 and vs2019

https://github.com/jberezanski/ChocolateyPackages/issues/117#issuecomment-921071306
This commit is contained in:
Amin Yahyaabadi 2021-09-16 13:20:03 -05:00
parent e9a591d9d4
commit 24f8038744
1 changed files with 6 additions and 6 deletions

View File

@ -43,19 +43,19 @@ export async function setupMSVC(
exportVariable("VCTargetsPath", VCTargetsPath) exportVariable("VCTargetsPath", VCTargetsPath)
} }
} else if (version === "2017") { } else if (version === "2017") {
toolset = "15.9.38.0" toolset = "14.16"
await setupChocoPack("visualstudio2017buildtools", toolset, [ await setupChocoPack("visualstudio2017buildtools", "15.9.38.0", [
"--package-parameters", "--package-parameters",
"add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive", "add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive",
]) ])
VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/Microsoft/VC/v150" 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 = "16.11.2.0" toolset = "14.29.30133"
await setupChocoPack("visualstudio2019buildtools", toolset, [ await setupChocoPack("visualstudio2019buildtools", "16.11.2.0", [
"--package-parameters", "--package-parameters",
"add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive", "add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive",
]) ])
VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160" VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133"
} }
if (VCTargetsPath !== undefined && existsSync(VCTargetsPath)) { if (VCTargetsPath !== undefined && existsSync(VCTargetsPath)) {
exportVariable("VCTargetsPath", VCTargetsPath) exportVariable("VCTargetsPath", VCTargetsPath)