Skip to content

Commit 8aa83e3

Browse files
committed
Remove .NET 6 SDK from Windows Server 2016 SDK images
1 parent 3277acd commit 8aa83e3

File tree

5 files changed

+34
-41
lines changed

5 files changed

+34
-41
lines changed

eng/dockerfile-templates/sdk/Dockerfile

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,7 @@ RUN `
4848
&& powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
4949
&& del vs_TestAgent.exe `
5050
`
51-
# Install VS Build Tools
52-
&& curl -fSLo vs_BuildTools.exe {{VARIABLES["vs|buildToolsUrl"]}} `
53-
&& start /w vs_BuildTools @^ `
54-
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" @^ `
55-
--add Microsoft.Component.ClickOnce.MSBuild @^ `
56-
--add Microsoft.Net.Component.{{sdkVersion}}.SDK @^ `
57-
--add Microsoft.NetCore.Component.Runtime.8.0 @^ `
58-
--add Microsoft.NetCore.Component.Runtime.9.0 @^ `
59-
--add Microsoft.NetCore.Component.SDK @^ `
60-
--add Microsoft.VisualStudio.Component.NuGet.BuildTools @^ `
61-
--add Microsoft.VisualStudio.Component.WebDeploy @^ `
62-
--add Microsoft.VisualStudio.Web.BuildTools.ComponentGroup @^ `
63-
--add Microsoft.VisualStudio.Workload.MSBuildTools @^ `
64-
--quiet --norestart --nocache --wait `
65-
&& powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
66-
&& del vs_BuildTools.exe `
51+
{{InsertTemplate("Dockerfile.install-vs-buildtools", [], " ")}}
6752
`
6853
# Trigger dotnet first run experience by running arbitrary cmd
6954
&& "%ProgramFiles%\dotnet\dotnet" help `
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{
2+
3+
_ ARGS:
4+
usePowerShell: whether to use PowerShell to download and remove files ^
5+
6+
set sdkVersion to when(PRODUCT_VERSION = "4.8.1", "4.8.1", "4.8")
7+
8+
}}# Install VS Build Tools{{
9+
if ARGS.usePowerShell:
10+
&& powershell -Command `
11+
$ProgressPreference = 'SilentlyContinue'; `
12+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
13+
Invoke-WebRequest `
14+
-UseBasicParsing `
15+
-Uri {{VARIABLES["vs|buildToolsUrl"]}} `
16+
-OutFile vs_BuildTools.exe `^
17+
else:
18+
&& curl -fSLo vs_BuildTools.exe {{VARIABLES["vs|buildToolsUrl"]}} `}}
19+
&& start /w vs_BuildTools @^ `
20+
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" @^ `
21+
--add Microsoft.Component.ClickOnce.MSBuild @^ `
22+
--add Microsoft.Net.Component.{{sdkVersion}}.SDK @^ `
23+
--add Microsoft.NetCore.Component.Runtime.8.0 @^ `
24+
--add Microsoft.NetCore.Component.Runtime.9.0 @^ `
25+
--add Microsoft.NetCore.Component.SDK @^ `
26+
--add Microsoft.VisualStudio.Component.NuGet.BuildTools @^ `
27+
--add Microsoft.VisualStudio.Component.WebDeploy @^ `
28+
--add Microsoft.VisualStudio.Web.BuildTools.ComponentGroup @^ `
29+
--add Microsoft.VisualStudio.Workload.MSBuildTools @^ `
30+
--quiet --norestart --nocache --wait `
31+
&& powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
32+
&& del vs_BuildTools.exe `

eng/dockerfile-templates/sdk/Dockerfile.ltsc2016

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,29 +65,7 @@ RUN `
6565
&& powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
6666
&& del vs_TestAgent.exe `
6767
`
68-
# Install VS Build Tools
69-
&& powershell -Command `
70-
$ProgressPreference = 'SilentlyContinue'; `
71-
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
72-
Invoke-WebRequest `
73-
-UseBasicParsing `
74-
-Uri {{VARIABLES["vs|buildToolsUrl"]}} `
75-
-OutFile vs_BuildTools.exe `
76-
&& start /w vs_BuildTools @^ `
77-
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" @^ `
78-
--add Microsoft.Component.ClickOnce.MSBuild @^ `
79-
--add Microsoft.Net.Component.4.8.SDK @^ `
80-
--add Microsoft.NetCore.Component.Runtime.6.0 @^ `
81-
--add Microsoft.NetCore.Component.Runtime.8.0 @^ `
82-
--add Microsoft.NetCore.Component.Runtime.9.0 @^ `
83-
--add Microsoft.NetCore.Component.SDK @^ `
84-
--add Microsoft.VisualStudio.Component.NuGet.BuildTools @^ `
85-
--add Microsoft.VisualStudio.Component.WebDeploy @^ `
86-
--add Microsoft.VisualStudio.Web.BuildTools.ComponentGroup @^ `
87-
--add Microsoft.VisualStudio.Workload.MSBuildTools @^ `
88-
--quiet --norestart --nocache --wait `
89-
&& powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
90-
&& del vs_BuildTools.exe `
68+
{{InsertTemplate("Dockerfile.install-vs-buildtools", [ "usePowerShell": "true" ], " ")}}
9169
`
9270
# Trigger dotnet first run experience by running arbitrary cmd
9371
&& "%ProgramFiles%\dotnet\dotnet" help `

src/sdk/3.5/windowsservercore-ltsc2016/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ RUN `
7676
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^ `
7777
--add Microsoft.Component.ClickOnce.MSBuild ^ `
7878
--add Microsoft.Net.Component.4.8.SDK ^ `
79-
--add Microsoft.NetCore.Component.Runtime.6.0 ^ `
8079
--add Microsoft.NetCore.Component.Runtime.8.0 ^ `
8180
--add Microsoft.NetCore.Component.Runtime.9.0 ^ `
8281
--add Microsoft.NetCore.Component.SDK ^ `

src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ RUN `
4444
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^ `
4545
--add Microsoft.Component.ClickOnce.MSBuild ^ `
4646
--add Microsoft.Net.Component.4.8.SDK ^ `
47-
--add Microsoft.NetCore.Component.Runtime.6.0 ^ `
4847
--add Microsoft.NetCore.Component.Runtime.8.0 ^ `
4948
--add Microsoft.NetCore.Component.Runtime.9.0 ^ `
5049
--add Microsoft.NetCore.Component.SDK ^ `

0 commit comments

Comments
 (0)