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 12
12
#
13
13
14
14
ARG WINDOWS_VERSION=ltsc2019
15
+ ENV WINDOWS_VERSION="$WINDOWS_VERSION"
15
16
16
17
# Builder Image - Windows Server Core
17
18
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION AS builder-base
@@ -29,6 +30,9 @@ RUN $msvs_build_tools_dist_name=\"vs_buildtools.exe\"; `
29
30
$msvs_build_tools_channel=\"C:\local\VisualStudio.chman\"; `
30
31
$msvs_build_tools_dist_url=\"${env:MSVS_BUILD_TOOLS_DOWNLOAD_URL}/${env:MSVS_BUILD_TOOLS_VERSION}/release/${msvs_build_tools_dist_name}\"; `
31
32
$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=\"\" }; `
32
36
Write-Host \"Downloading Visual Studio Build Tools...\"; `
33
37
Write-Host \"${msvs_build_tools_dist_url} -> ${msvs_build_tools_dist}\"; `
34
38
Write-Host \"${msvs_build_tools_channel_url} -> ${msvs_build_tools_channel}\"; `
@@ -41,7 +45,8 @@ RUN $msvs_build_tools_dist_name=\"vs_buildtools.exe\"; `
41
45
\"--channelUri ${msvs_build_tools_channel}\", `
42
46
\"--installChannelUri ${msvs_build_tools_channel}\", `
43
47
'--add Microsoft.VisualStudio.Workload.VCTools', `
44
- '--includeRecommended' -NoNewWindow -Wait; `
48
+ $includeRecommended `
49
+ -NoNewWindow -Wait; `
45
50
Remove-Item -Force \"${msvs_build_tools_dist}\";
46
51
47
52
You can’t perform that action at this time.
0 commit comments