3
3
ARG REPO=mcr.microsoft.com/dotnet/framework/runtime
4
4
FROM $REPO:3.5-windowsservercore-ltsc2016
5
5
6
- # Install .NET 4.7.2
7
- RUN powershell Invoke-WebRequest -Uri "https://download.microsoft.com/download/6/E/4/6E48E8AB-DC00-419E-9704-06DD46E5F81D/NDP472-KB4054530-x86-x64-AllOS-ENU.exe" -OutFile dotnet-framework-installer.exe & `
6
+ # Install .NET 4.8 Fx
7
+ RUN powershell -Command `
8
+ $ProgressPreference = 'SilentlyContinue' ; `
9
+ Invoke-WebRequest -Uri "https://download.visualstudio.microsoft.com/download/pr/7afca223-55d2-470a-8edc-6a1739ae3252/abd170b4b0ec15ad0222a809b761a036/ndp48-x86-x64-allos-enu.exe" -OutFile dotnet-framework-installer.exe & `
8
10
.\d otnet-framework-installer.exe /q & `
9
11
del .\d otnet-framework-installer.exe & `
10
12
powershell Remove-Item -Force -Recurse ${Env:TEMP}\*
@@ -13,7 +15,7 @@ RUN powershell Invoke-WebRequest -Uri "https://download.microsoft.com/download/6
13
15
RUN \W indows\M icrosoft.NET\F ramework64\v 4.0.30319\n gen update & `
14
16
\W indows\M icrosoft.NET\F ramework\v 4.0.30319\n gen update
15
17
16
- # Can't set SHELL prior to installing 4.7.2 runtime - PowerShell being loaded prevents GAC from getting updated without restart
18
+ # Can't set SHELL prior to installing 4.8 runtime - PowerShell being loaded prevents GAC from getting updated without restart
17
19
SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
18
20
19
21
# Install NuGet CLI
@@ -33,16 +35,21 @@ RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.c
33
35
-ArgumentList `
34
36
'--add' , 'Microsoft.VisualStudio.Workload.MSBuildTools' , `
35
37
'--add' , 'Microsoft.VisualStudio.Workload.NetCoreBuildTools' , `
36
- '--add' , 'Microsoft.Net.Component.4.7.2.SDK' , `
37
38
'--add' , 'Microsoft.Component.ClickOnce.MSBuild' , `
38
39
'--quiet' , '--norestart' , '--nocache' `
39
40
-NoNewWindow -Wait; `
40
41
Remove-Item -Force vs_buildtools.exe; `
41
42
Remove-Item -Force -Recurse \" ${Env:ProgramFiles(x86)}\M icrosoft Visual Studio\I nstaller\" ; `
42
43
Remove-Item -Force -Recurse ${Env:TEMP}\* ; `
43
- Remove-Item -Force -Recurse \" ${Env:ProgramData}\M icrosoft\V isualStudio\P ackages\" ; `
44
44
Remove-Item -Force -Recurse \" ${Env:ProgramData}\P ackage Cache\"
45
45
46
+ # Install .NET 4.8 SDK
47
+ RUN Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/dockerassets/sdk_tools48.zip -OutFile sdk_tools48.zip; `
48
+ Expand-Archive sdk_tools48.zip; `
49
+ Start-Process msiexec -ArgumentList '/i' , 'sdk_tools48\s dk_tools48.msi' , '/quiet' , 'VSEXTUI=1' -NoNewWindow -Wait; `
50
+ Remove-Item -Force -Recurse sdk_tools48; `
51
+ Remove-Item -Force -Recurse ${Env:TEMP}\*
52
+
46
53
# Install web targets
47
54
RUN Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/dockerassets/MSBuild.Microsoft.VisualStudio.Web.targets.2019.04.zip -OutFile MSBuild.Microsoft.VisualStudio.Web.targets.zip;`
48
55
Expand-Archive MSBuild.Microsoft.VisualStudio.Web.targets.zip -DestinationPath \" ${Env:ProgramFiles(x86)}\M icrosoft Visual Studio\2 019\B uildTools\M SBuild\M icrosoft\V isualStudio\v 16.0\" ; `
@@ -53,9 +60,9 @@ ENV ROSLYN_COMPILER_LOCATION "C:\Program Files (x86)\Microsoft Visual Studio\201
53
60
# ngen assemblies queued by VS installers - must be done in cmd shell to avoid access issues
54
61
SHELL ["cmd" , "/S" , "/C" ]
55
62
RUN `
56
- # Workaround for issue with 32 bit assemblies from Microsoft.Net.Component.4.7.2. SDK being 64 bit ngen'ed
57
- \W indows\M icrosoft.NET\F ramework64\v 4.0.30319\n gen uninstall "C:\P rogram Files (x86)\M icrosoft SDKs\W indows\v 10.0A\b in\N ETFX 4.7.2 Tools\S ecAnnotate.exe" `
58
- && \W indows\M icrosoft.NET\F ramework64\v 4.0.30319\n gen uninstall "C:\P rogram Files (x86)\M icrosoft SDKs\W indows\v 10.0A\b in\N ETFX 4.7.2 Tools\W inMDExp.exe" `
63
+ # Workaround for issue with 32 bit assemblies from .NET Framework 4.8 SDK being 64 bit ngen'ed
64
+ \W indows\M icrosoft.NET\F ramework64\v 4.0.30319\n gen uninstall "C:\P rogram Files (x86)\M icrosoft SDKs\W indows\v 10.0A\b in\N ETFX 4.8 Tools\S ecAnnotate.exe" `
65
+ && \W indows\M icrosoft.NET\F ramework64\v 4.0.30319\n gen uninstall "C:\P rogram Files (x86)\M icrosoft SDKs\W indows\v 10.0A\b in\N ETFX 4.8 Tools\W inMDExp.exe" `
59
66
`
60
67
&& \W indows\M icrosoft.NET\F ramework64\v 4.0.30319\n gen update `
61
68
`
@@ -72,11 +79,11 @@ RUN setx /M PATH $(${Env:PATH} `
72
79
+ \" ;${Env:ProgramFiles}\N uGet\" `
73
80
+ \" ;${Env:ProgramFiles(x86)}\M icrosoft Visual Studio\2 019\T estAgent\C ommon7\I DE\C ommonExtensions\M icrosoft\T estWindow\" `
74
81
+ \" ;${Env:ProgramFiles(x86)}\M icrosoft Visual Studio\2 019\B uildTools\M SBuild\C urrent\B in\" `
75
- + \" ;${Env:ProgramFiles(x86)}\M icrosoft SDKs\W indows\v 10.0A\b in\N ETFX 4.7.2 Tools\" `
82
+ + \" ;${Env:ProgramFiles(x86)}\M icrosoft SDKs\W indows\v 10.0A\b in\N ETFX 4.8 Tools\" `
76
83
+ \" ;${Env:ProgramFiles(x86)}\M icrosoft SDKs\C lickOnce\S ignTool\" )
77
84
78
85
# Install Targeting Packs
79
- RUN @('4.0' , '4.5.2' , '4.6.2' , '4.7.2' ) `
86
+ RUN @('4.0' , '4.5.2' , '4.6.2' , '4.7.2' , '4.8' ) `
80
87
| %{ `
81
88
Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/referenceassemblies/v${_}.zip -OutFile referenceassemblies.zip; `
82
89
Expand-Archive referenceassemblies.zip -DestinationPath \" ${Env:ProgramFiles(x86)}\R eference Assemblies\M icrosoft\F ramework\. NETFramework\" ; `
0 commit comments