Skip to content

Commit 9ce73ba

Browse files
authored
Update Visual Studio tools to 2026 and add .NET 10 Runtime to SDK images (#1271)
1 parent b66c3f0 commit 9ce73ba

File tree

17 files changed

+139
-100
lines changed

17 files changed

+139
-100
lines changed

.portal-docs/docker-hub/README.sdk.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ This image contains the .NET Framework SDK which is comprised of the following p
1313

1414
1. .NET Framework Runtime
1515
1. Visual Studio Build Tools
16-
1. Visual Studio Test Agent
1716
1. NuGet CLI
1817
1. .NET Framework Targeting Packs
1918
1. ASP.NET Web Targets

.portal-docs/mar/README.sdk.portal.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ This image contains the .NET Framework SDK which is comprised of the following p
44

55
1. .NET Framework Runtime
66
1. Visual Studio Build Tools
7-
1. Visual Studio Test Agent
87
1. NuGet CLI
98
1. .NET Framework Targeting Packs
109
1. ASP.NET Web Targets

README.sdk.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This image contains the .NET Framework SDK which is comprised of the following p
1515

1616
1. .NET Framework Runtime
1717
1. Visual Studio Build Tools
18-
1. Visual Studio Test Agent
1918
1. NuGet CLI
2019
1. .NET Framework Targeting Packs
2120
1. ASP.NET Web Targets
@@ -65,25 +64,25 @@ Additionally, .NET Framework 4.8 and 4.8.1 can run apps that were built targetin
6564

6665
Tag | Dockerfile
6766
---------| ---------------
68-
4.8.1-20251014-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/sdk/4.8.1/windowsservercore-ltsc2025/Dockerfile)
67+
4.8.1-20251118-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/sdk/4.8.1/windowsservercore-ltsc2025/Dockerfile)
6968

7069
### Windows Server Core 2022 amd64 Tags
7170

7271
Tag | Dockerfile
7372
---------| ---------------
74-
4.8.1-20251014-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile)
73+
4.8.1-20251118-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile)
7574

7675
### Windows Server Core 2019 amd64 Tags
7776

7877
Tag | Dockerfile
7978
---------| ---------------
80-
4.8-20251014-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile)
79+
4.8-20251118-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile)
8180

8281
### Windows Server Core 2016 amd64 Tags
8382

8483
Tag | Dockerfile
8584
---------| ---------------
86-
4.8-20251014-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile)
85+
4.8-20251118-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile)
8786
<!--End of generated tags-->
8887

8988
*Tags not listed in the table above are not supported. See the [Supported Tags Policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md).

eng/dockerfile-templates/sdk/Dockerfile

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV `
1313
}}# NuGet version to install
1414
NUGET_VERSION={{VARIABLES[cat("nuget|version")]}} `
1515
# Install location of Roslyn
16-
ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\Roslyn"
16+
ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\Bin\Roslyn"
1717
{{if OS_VERSION_NUMBER = "ltsc2019" && PRODUCT_VERSION = "3.5"
1818
:
1919
RUN `
@@ -41,14 +41,7 @@ RUN mkdir "%ProgramFiles%\NuGet\latest" `
4141
&& mklink "%ProgramFiles%\NuGet\latest\nuget.exe" "%ProgramFiles%\NuGet\nuget.exe"
4242

4343
# Install VS components
44-
RUN `
45-
# Install VS Test Agent
46-
curl -fSLo vs_TestAgent.exe {{VARIABLES["vs|testAgentUrl"]}} `
47-
&& start /w vs_TestAgent --quiet --norestart --nocache --wait --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\TestAgent" `
48-
&& powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
49-
&& del vs_TestAgent.exe `
50-
`
51-
{{InsertTemplate("Dockerfile.install-vs-buildtools", [], " ")}}
44+
RUN {{InsertTemplate("Dockerfile.install-vs-buildtools", [], " ")}}
5245
`
5346
# Trigger dotnet first run experience by running arbitrary cmd
5447
&& "%ProgramFiles%\dotnet\dotnet" help `
@@ -65,14 +58,13 @@ RUN `
6558
# Cleanup
6659
&& (for /D %i in ("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\*") do rmdir /S /Q "%i") `
6760
&& (for %i in ("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\*") do if not "%~nxi" == "vswhere.exe" del "%~i") `
68-
&& powershell Remove-Item -Force -Recurse "%TEMP%\*" `
69-
&& rmdir /S /Q "%ProgramData%\Package Cache"
61+
&& powershell Remove-Item -Force -Recurse "%TEMP%\*"
7062

7163
# Set PATH in one layer to keep image size down.
7264
RUN powershell setx /M PATH $(${Env:PATH} `
7365
+ \";${Env:ProgramFiles}\NuGet\" `
74-
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\" `
75-
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\" `
66+
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\Bin\amd64\" `
67+
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\18\BuildTools\Common7\IDE\Extensions\TestPlatform\" `
7668
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX {{sdkVersion}} Tools\" `
7769
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\ClickOnce\SignTool\")
7870

eng/dockerfile-templates/sdk/Dockerfile.install-vs-buildtools

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,42 @@
33
_ ARGS:
44
usePowerShell: whether to use PowerShell to download and remove files ^
55

6-
set sdkVersion to when(PRODUCT_VERSION = "4.8.1", "4.8.1", "4.8")
6+
set sdkVersion to when(PRODUCT_VERSION = "4.8.1", "4.8.1", "4.8") ^
7+
set is2016 to OS_VERSION_NUMBER = "ltsc2016" ^
78

8-
}}# Install VS Build Tools{{
9-
if ARGS.usePowerShell:
10-
&& powershell -Command `
9+
_ VS 2026 does not support Windows Server LTSC 2016
10+
https://learn.microsoft.com/en-us/visualstudio/releases/2026/vs-system-requirements ^
11+
set vsBuildToolsUrl to
12+
when(is2016,
13+
VARIABLES["vs|ltsc2016|buildToolsUrl"],
14+
VARIABLES["vs|buildToolsUrl"]) ^
15+
set vsPath to
16+
when(is2016,
17+
"%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools",
18+
"%ProgramFiles(x86)%\Microsoft Visual Studio\18\BuildTools")
19+
20+
}}{{
21+
if ARGS.usePowerShell:powershell -Command `
1122
$ProgressPreference = 'SilentlyContinue'; `
1223
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
1324
Invoke-WebRequest `
1425
-UseBasicParsing `
15-
-Uri {{VARIABLES["vs|buildToolsUrl"]}} `
26+
-Uri {{vsBuildToolsUrl}} `
1627
-OutFile vs_BuildTools.exe `^
17-
else:
18-
&& curl -fSLo vs_BuildTools.exe {{VARIABLES["vs|buildToolsUrl"]}} `}}
28+
else:curl -fSLo vs_BuildTools.exe {{vsBuildToolsUrl}} `}}
1929
&& start /w vs_BuildTools @^ `
20-
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" @^ `
30+
--installPath "{{vsPath}}" @^ `
2131
--add Microsoft.Component.ClickOnce.MSBuild @^ `
2232
--add Microsoft.Net.Component.{{sdkVersion}}.SDK @^ `
2333
--add Microsoft.NetCore.Component.Runtime.8.0 @^ `
2434
--add Microsoft.NetCore.Component.Runtime.9.0 @^ `
35+
--add Microsoft.NetCore.Component.Runtime.10.0 @^ `
2536
--add Microsoft.NetCore.Component.SDK @^ `
2637
--add Microsoft.VisualStudio.Component.NuGet.BuildTools @^ `
27-
--add Microsoft.VisualStudio.Component.WebDeploy @^ `
38+
--add Microsoft.VisualStudio.Component.WebDeploy @^ `{{if !is2016:
39+
--add Microsoft.VisualStudio.Component.TestTools.BuildTools @^ `}}
2840
--add Microsoft.VisualStudio.Web.BuildTools.ComponentGroup @^ `
2941
--add Microsoft.VisualStudio.Workload.MSBuildTools @^ `
3042
--quiet --norestart --nocache --wait `
3143
&& 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 `
44+
&& del vs_BuildTools.exe `

eng/dockerfile-templates/sdk/Dockerfile.ltsc2016

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ RUN `
5959
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
6060
Invoke-WebRequest `
6161
-UseBasicParsing `
62-
-Uri {{VARIABLES["vs|testAgentUrl"]}} `
62+
-Uri {{VARIABLES["vs|ltsc2016|testAgentUrl"]}} `
6363
-OutFile vs_TestAgent.exe `
6464
&& start /w vs_TestAgent --quiet --norestart --nocache --wait --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\TestAgent" `
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-
{{InsertTemplate("Dockerfile.install-vs-buildtools", [ "usePowerShell": "true" ], " ")}}
68+
# Install VS Build Tools
69+
&& {{InsertTemplate("Dockerfile.install-vs-buildtools", [ "usePowerShell": "true" ], " ")}}
6970
`
7071
# Trigger dotnet first run experience by running arbitrary cmd
7172
&& "%ProgramFiles%\dotnet\dotnet" help `

eng/readme-templates/About.sdk.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ This image contains the .NET Framework SDK which is comprised of the following p
22

33
1. .NET Framework Runtime
44
1. Visual Studio Build Tools
5-
1. Visual Studio Test Agent
65
1. NuGet CLI
76
1. .NET Framework Targeting Packs
87
1. ASP.NET Web Targets

manifest.datestamps.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"variables": {
3-
"CurrentReleaseDateStamp": "20251014",
4-
"RuntimeReleaseDateStamp": "$(CurrentReleaseDateStamp)",
5-
"AspnetReleaseDateStamp": "$(CurrentReleaseDateStamp)",
6-
"WcfReleaseDateStamp": "$(CurrentReleaseDateStamp)",
3+
"CurrentReleaseDateStamp": "20251118",
4+
"PreviousReleaseDateStamp": "20251014",
5+
"RuntimeReleaseDateStamp": "$(PreviousReleaseDateStamp)",
6+
"AspnetReleaseDateStamp": "$(PreviousReleaseDateStamp)",
7+
"WcfReleaseDateStamp": "$(PreviousReleaseDateStamp)",
78
"SdkReleaseDateStamp": "$(CurrentReleaseDateStamp)",
89

910
"4.8-ltsc2016-Runtime-DateStamp": "$(RuntimeReleaseDateStamp)",

manifest.versions.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
"referenceassemblies|version": "1.0.3",
1414
"servicemonitor|version": "2.0.1.10",
1515
"servicemonitor|url": "https://github.com/microsoft/IIS.ServiceMonitor/releases/download/v$(servicemonitor|version)/ServiceMonitor.exe",
16-
"vs|version": "17.14",
17-
"vs|testAgentUrl": "https://aka.ms/vs/17/release/vs_TestAgent.exe",
18-
"vs|buildToolsUrl": "https://aka.ms/vs/17/release/vs_BuildTools.exe",
16+
"vs|version": "18.0",
17+
"vs|buildToolsUrl": "https://aka.ms/vs/stable/vs_BuildTools.exe",
18+
"vs|ltsc2016|version": "17.14",
19+
"vs|ltsc2016|testAgentUrl": "https://aka.ms/vs/17/release/vs_TestAgent.exe",
20+
"vs|ltsc2016|buildToolsUrl": "https://aka.ms/vs/17/release/vs_BuildTools.exe",
1921
"4.8|url": "https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe",
2022
"4.8.1|url": "https://download.visualstudio.microsoft.com/download/pr/6f083c7e-bd40-44d4-9e3f-ffba71ec8b09/3951fd5af6098f2c7e8ff5c331a0679c/ndp481-x86-x64-allos-enu.exe"
2123
}

src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,26 @@ ENV `
1111
# NuGet version to install
1212
NUGET_VERSION=6.14.0 `
1313
# Install location of Roslyn
14-
ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\Roslyn"
14+
ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\Bin\Roslyn"
1515

1616
# Install NuGet CLI
1717
RUN mkdir "%ProgramFiles%\NuGet\latest" `
1818
&& curl -fSLo "%ProgramFiles%\NuGet\nuget.exe" https://dist.nuget.org/win-x86-commandline/v%NUGET_VERSION%/nuget.exe `
1919
&& mklink "%ProgramFiles%\NuGet\latest\nuget.exe" "%ProgramFiles%\NuGet\nuget.exe"
2020

2121
# Install VS components
22-
RUN `
23-
# Install VS Test Agent
24-
curl -fSLo vs_TestAgent.exe https://aka.ms/vs/17/release/vs_TestAgent.exe `
25-
&& start /w vs_TestAgent --quiet --norestart --nocache --wait --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\TestAgent" `
26-
&& powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
27-
&& del vs_TestAgent.exe `
28-
`
29-
# Install VS Build Tools
30-
&& curl -fSLo vs_BuildTools.exe https://aka.ms/vs/17/release/vs_BuildTools.exe `
22+
RUN curl -fSLo vs_BuildTools.exe https://aka.ms/vs/stable/vs_BuildTools.exe `
3123
&& start /w vs_BuildTools ^ `
32-
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^ `
24+
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\18\BuildTools" ^ `
3325
--add Microsoft.Component.ClickOnce.MSBuild ^ `
3426
--add Microsoft.Net.Component.4.8.1.SDK ^ `
3527
--add Microsoft.NetCore.Component.Runtime.8.0 ^ `
3628
--add Microsoft.NetCore.Component.Runtime.9.0 ^ `
29+
--add Microsoft.NetCore.Component.Runtime.10.0 ^ `
3730
--add Microsoft.NetCore.Component.SDK ^ `
3831
--add Microsoft.VisualStudio.Component.NuGet.BuildTools ^ `
3932
--add Microsoft.VisualStudio.Component.WebDeploy ^ `
33+
--add Microsoft.VisualStudio.Component.TestTools.BuildTools ^ `
4034
--add Microsoft.VisualStudio.Web.BuildTools.ComponentGroup ^ `
4135
--add Microsoft.VisualStudio.Workload.MSBuildTools ^ `
4236
--quiet --norestart --nocache --wait `
@@ -56,14 +50,13 @@ RUN `
5650
# Cleanup
5751
&& (for /D %i in ("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\*") do rmdir /S /Q "%i") `
5852
&& (for %i in ("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\*") do if not "%~nxi" == "vswhere.exe" del "%~i") `
59-
&& powershell Remove-Item -Force -Recurse "%TEMP%\*" `
60-
&& rmdir /S /Q "%ProgramData%\Package Cache"
53+
&& powershell Remove-Item -Force -Recurse "%TEMP%\*"
6154

6255
# Set PATH in one layer to keep image size down.
6356
RUN powershell setx /M PATH $(${Env:PATH} `
6457
+ \";${Env:ProgramFiles}\NuGet\" `
65-
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\" `
66-
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\" `
58+
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\Bin\amd64\" `
59+
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\18\BuildTools\Common7\IDE\Extensions\TestPlatform\" `
6760
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\" `
6861
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\ClickOnce\SignTool\")
6962

0 commit comments

Comments
 (0)