diff --git a/windows/image/install-compiler.ps1 b/windows/image/install-compiler.ps1 index d1578d6b..50c8fbd0 100644 --- a/windows/image/install-compiler.ps1 +++ b/windows/image/install-compiler.ps1 @@ -1,6 +1,6 @@ Param( [Parameter(Mandatory=$true)] - [ValidateSet('15', '16', '17')] + [ValidateSet('15', '16', '17', '18')] [string] $msvcVersion, [Parameter(Mandatory=$false)] diff --git a/windows/image/installers/build-env.ps1 b/windows/image/installers/build-env.ps1 index 2276b389..527b3f30 100644 --- a/windows/image/installers/build-env.ps1 +++ b/windows/image/installers/build-env.ps1 @@ -42,6 +42,7 @@ $MSBuildPathMap = @{ "14.41"="$MSBuildPath\17\VC\Auxiliary\Build" "14.42"="$MSBuildPath\17\VC\Auxiliary\Build" "14.43"="$MSBuildPath\17\VC\Auxiliary\Build" + "14.50"="$MSBuildPath\18\VC\Auxiliary\Build" "latest"="$MSBuildPath\$ENV:INSTALLED_MSVC_VERSION\VC\Auxiliary\Build" } diff --git a/windows/image/installers/install-vs.ps1 b/windows/image/installers/install-vs.ps1 index 3f854178..26867c76 100644 --- a/windows/image/installers/install-vs.ps1 +++ b/windows/image/installers/install-vs.ps1 @@ -1,6 +1,6 @@ Param( [Parameter(Mandatory=$true)] - [ValidateSet('15', '16', '17')] + [ValidateSet('15', '16', '17', '18')] [string] $msvcVersion, [Parameter(Mandatory=$false)] @@ -8,13 +8,13 @@ Param( $clVersion ) - $msvcPath = "C:\msbuild\$msvcVersion" $vsComponentsMap = @{ "15" = "Microsoft.VisualStudio.Component.Windows10SDK.17763" "16" = "Microsoft.VisualStudio.Component.Windows10SDK.19041" "17" = "Microsoft.VisualStudio.Component.Windows11SDK.22621" + "18" = "Microsoft.VisualStudio.Component.Windows11SDK.22621" "14.14" = "Microsoft.VisualStudio.Component.VC.Tools.14.14" "14.15" = "Microsoft.VisualStudio.Component.VC.Tools.14.15" "14.16" = "Microsoft.VisualStudio.Component.VC.Tools.14.16" @@ -31,9 +31,18 @@ $vsComponentsMap = @{ "14.41" = "Microsoft.VisualStudio.Component.VC.14.41.17.11.x86.x64" "14.42" = "Microsoft.VisualStudio.Component.VC.14.42.17.12.x86.x64" "14.43" = "Microsoft.VisualStudio.Component.VC.14.43.17.13.x86.x64" + "14.50" = "Microsoft.VisualStudio.Component.VC.14.50.18.0.x86.x64" "latest" = "Microsoft.VisualStudio.Component.VC.Tools.x86.x64" } +$channelMap = @{ + "15"="release" + "16"="release" + "17"="release" + "18"="insiders" +} +$channel = $channelMap[$msvcVersion] + # Always install/update core VC tools $vsComponent = $vsComponentsMap[$msvcVersion] $vsComponentString = "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add $vsComponent" @@ -49,7 +58,7 @@ if ($clVersion -eq "14.16") { $vsComponentString = "$vsComponentString --add $clComponent" } -Invoke-WebRequest -Uri "https://aka.ms/vs/$msvcVersion/release/vs_buildtools.exe" -UseBasicParsing -OutFile .\vs_buildtools.exe +Invoke-WebRequest -Uri "https://aka.ms/vs/$msvcVersion/$channel/vs_buildtools.exe" -UseBasicParsing -OutFile .\vs_buildtools.exe Write-Output "Installing components: $vsComponentString" Start-Process -NoNewWindow -PassThru -Wait -FilePath .\vs_buildtools.exe -ArgumentList "install --installWhileDownloading --installPath $msvcPath --wait --norestart --nocache --quiet $vsComponentString" diff --git a/windows/vs-version-matrix.ps1 b/windows/vs-version-matrix.ps1 index 24199abf..dbe9433b 100644 --- a/windows/vs-version-matrix.ps1 +++ b/windows/vs-version-matrix.ps1 @@ -2,6 +2,7 @@ $global:vsVerToCompilers = @{ "2017"=("14.14", "14.15", "14.16"); "2019"=("14.27", "14.28", "14.29"); "2022"=("14.35", "14.36", "14.37", "14.38", "14.39", "14.40", "14.41", "14.42", "14.43"); + "2026"=("14.50") } $global:vsCompilersToYear = @{ @@ -21,17 +22,20 @@ $global:vsCompilersToYear = @{ "14.41"="2022" "14.42"="2022" "14.43"="2022" - "latest"="2022" + "14.50"="2026" + "latest"="2026" } $global:vsVerToYear = @{ "15"="2017" "16"="2019" "17"="2022" + "18"="2026" } $global:vsYearToVer = @{ "2017"="15" "2019"="16" "2022"="17" + "2026"="18" }