File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1212#
1313
1414ARG WINDOWS_VERSION=ltsc2019
15+ ENV WINDOWS_VERSION="$WINDOWS_VERSION"
1516
1617# Builder Image - Windows Server Core
1718FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION AS builder-base
@@ -29,6 +30,9 @@ RUN $msvs_build_tools_dist_name=\"vs_buildtools.exe\"; `
2930 $msvs_build_tools_channel=\"C:\local\VisualStudio.chman\"; `
3031 $msvs_build_tools_dist_url=\"${env:MSVS_BUILD_TOOLS_DOWNLOAD_URL}/${env:MSVS_BUILD_TOOLS_VERSION}/release/${msvs_build_tools_dist_name}\"; `
3132 $msvs_build_tools_channel_url=\"${env:MSVS_BUILD_TOOLS_DOWNLOAD_URL}/${env:MSVS_BUILD_TOOLS_VERSION}/release/channel\"; `
33+ # Bydefault includeRecommended is absent when using ltsc2025
34+ $includeRecommended=\"--includeRecommended\"; `
35+ if (\"${env:WINDOWS_VERSION}\" -eq \"ltsc2025\") { $includeRecommended=\"\" }; `
3236 Write-Host \"Downloading Visual Studio Build Tools...\"; `
3337 Write-Host \"${msvs_build_tools_dist_url} -> ${msvs_build_tools_dist}\"; `
3438 Write-Host \"${msvs_build_tools_channel_url} -> ${msvs_build_tools_channel}\"; `
@@ -41,7 +45,8 @@ RUN $msvs_build_tools_dist_name=\"vs_buildtools.exe\"; `
4145 \"--channelUri ${msvs_build_tools_channel}\", `
4246 \"--installChannelUri ${msvs_build_tools_channel}\", `
4347 '--add Microsoft.VisualStudio.Workload.VCTools', `
44- '--includeRecommended' -NoNewWindow -Wait; `
48+ $includeRecommended `
49+ -NoNewWindow -Wait; `
4550 Remove-Item -Force \"${msvs_build_tools_dist}\";
4651
4752
You can’t perform that action at this time.
0 commit comments