Skip to content

Add .NET Framework 4.8 #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions 3.5/sdk/windowsservercore-1803/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
ARG REPO=mcr.microsoft.com/dotnet/framework/runtime
FROM $REPO:3.5-windowsservercore-1803

# Install .NET 4.8 Fx
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
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 & `
.\dotnet-framework-installer.exe /q & `
del .\dotnet-framework-installer.exe & `
powershell Remove-Item -Force -Recurse ${Env:TEMP}\*

# ngen .NET Fx
RUN \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update & `
\Windows\Microsoft.NET\Framework\v4.0.30319\ngen update

# Can't set SHELL prior to installing 4.8 runtime - PowerShell being loaded prevents GAC from getting updated without restart
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Install NuGet CLI
Expand All @@ -22,7 +35,6 @@ RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.c
-ArgumentList `
'--add', 'Microsoft.VisualStudio.Workload.MSBuildTools', `
'--add', 'Microsoft.VisualStudio.Workload.NetCoreBuildTools', `
'--add', 'Microsoft.Net.Component.4.7.2.SDK', `
'--add', 'Microsoft.Component.ClickOnce.MSBuild', `
'--quiet', '--norestart', '--nocache' `
-NoNewWindow -Wait; `
Expand All @@ -32,6 +44,13 @@ RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.c
Remove-Item -Force -Recurse \"${Env:ProgramData}\Microsoft\VisualStudio\Packages\"; `
Remove-Item -Force -Recurse \"${Env:ProgramData}\Package Cache\"

# Install .NET 4.8 SDK
RUN Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/dockerassets/sdk_tools48.zip -OutFile sdk_tools48.zip; `
Expand-Archive sdk_tools48.zip; `
Start-Process msiexec -ArgumentList '/i', 'sdk_tools48\sdk_tools48.msi', '/quiet', 'VSEXTUI=1' -NoNewWindow -Wait; `
Remove-Item -Force -Recurse sdk_tools48; `
Remove-Item -Force -Recurse ${Env:TEMP}\*

# Install web targets
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;`
Expand-Archive MSBuild.Microsoft.VisualStudio.Web.targets.zip -DestinationPath \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\"; `
Expand All @@ -42,9 +61,9 @@ ENV ROSLYN_COMPILER_LOCATION "C:\Program Files (x86)\Microsoft Visual Studio\201
# ngen assemblies queued by VS installers - must be done in cmd shell to avoid access issues
SHELL ["cmd", "/S", "/C"]
RUN `
# Workaround for issue with 32 bit assemblies from Microsoft.Net.Component.4.7.2.SDK being 64 bit ngen'ed
\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\SecAnnotate.exe" `
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\WinMDExp.exe" `
# Workaround for issue with 32 bit assemblies from .NET Framework 4.8 SDK being 64 bit ngen'ed
\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\SecAnnotate.exe" `
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\WinMDExp.exe" `
`
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update `
`
Expand All @@ -61,11 +80,11 @@ RUN setx /M PATH $(${Env:PATH} `
+ \";${Env:ProgramFiles}\NuGet\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\ClickOnce\SignTool\")

# Install Targeting Packs
RUN @('4.0', '4.5.2', '4.6.2', '4.7.2') `
RUN @('4.0', '4.5.2', '4.6.2', '4.7.2', '4.8') `
| %{ `
Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/referenceassemblies/v${_}.zip -OutFile referenceassemblies.zip; `
Expand-Archive referenceassemblies.zip -DestinationPath \"${Env:ProgramFiles(x86)}\Reference Assemblies\Microsoft\Framework\.NETFramework\"; `
Expand Down
26 changes: 17 additions & 9 deletions 3.5/sdk/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
ARG REPO=mcr.microsoft.com/dotnet/framework/runtime
FROM $REPO:3.5-windowsservercore-ltsc2016

# Install .NET 4.7.2
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 & `
# Install .NET 4.8 Fx
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
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 & `
.\dotnet-framework-installer.exe /q & `
del .\dotnet-framework-installer.exe & `
powershell Remove-Item -Force -Recurse ${Env:TEMP}\*
Expand All @@ -13,7 +15,7 @@ RUN powershell Invoke-WebRequest -Uri "https://download.microsoft.com/download/6
RUN \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update & `
\Windows\Microsoft.NET\Framework\v4.0.30319\ngen update

# Can't set SHELL prior to installing 4.7.2 runtime - PowerShell being loaded prevents GAC from getting updated without restart
# Can't set SHELL prior to installing 4.8 runtime - PowerShell being loaded prevents GAC from getting updated without restart
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Install NuGet CLI
Expand All @@ -33,7 +35,6 @@ RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.c
-ArgumentList `
'--add', 'Microsoft.VisualStudio.Workload.MSBuildTools', `
'--add', 'Microsoft.VisualStudio.Workload.NetCoreBuildTools', `
'--add', 'Microsoft.Net.Component.4.7.2.SDK', `
'--add', 'Microsoft.Component.ClickOnce.MSBuild', `
'--quiet', '--norestart', '--nocache' `
-NoNewWindow -Wait; `
Expand All @@ -43,6 +44,13 @@ RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.c
Remove-Item -Force -Recurse \"${Env:ProgramData}\Microsoft\VisualStudio\Packages\"; `
Remove-Item -Force -Recurse \"${Env:ProgramData}\Package Cache\"

# Install .NET 4.8 SDK
RUN Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/dockerassets/sdk_tools48.zip -OutFile sdk_tools48.zip; `
Expand-Archive sdk_tools48.zip; `
Start-Process msiexec -ArgumentList '/i', 'sdk_tools48\sdk_tools48.msi', '/quiet', 'VSEXTUI=1' -NoNewWindow -Wait; `
Remove-Item -Force -Recurse sdk_tools48; `
Remove-Item -Force -Recurse ${Env:TEMP}\*

# Install web targets
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;`
Expand-Archive MSBuild.Microsoft.VisualStudio.Web.targets.zip -DestinationPath \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\"; `
Expand All @@ -53,9 +61,9 @@ ENV ROSLYN_COMPILER_LOCATION "C:\Program Files (x86)\Microsoft Visual Studio\201
# ngen assemblies queued by VS installers - must be done in cmd shell to avoid access issues
SHELL ["cmd", "/S", "/C"]
RUN `
# Workaround for issue with 32 bit assemblies from Microsoft.Net.Component.4.7.2.SDK being 64 bit ngen'ed
\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\SecAnnotate.exe" `
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\WinMDExp.exe" `
# Workaround for issue with 32 bit assemblies from .NET Framework 4.8 SDK being 64 bit ngen'ed
\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\SecAnnotate.exe" `
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\WinMDExp.exe" `
`
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update `
`
Expand All @@ -72,11 +80,11 @@ RUN setx /M PATH $(${Env:PATH} `
+ \";${Env:ProgramFiles}\NuGet\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\ClickOnce\SignTool\")

# Install Targeting Packs
RUN @('4.0', '4.5.2', '4.6.2', '4.7.2') `
RUN @('4.0', '4.5.2', '4.6.2', '4.7.2', '4.8') `
| %{ `
Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/referenceassemblies/v${_}.zip -OutFile referenceassemblies.zip; `
Expand-Archive referenceassemblies.zip -DestinationPath \"${Env:ProgramFiles(x86)}\Reference Assemblies\Microsoft\Framework\.NETFramework\"; `
Expand Down
31 changes: 25 additions & 6 deletions 3.5/sdk/windowsservercore-ltsc2019/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
ARG REPO=mcr.microsoft.com/dotnet/framework/runtime
FROM $REPO:3.5-windowsservercore-ltsc2019

# Install .NET 4.8 Fx
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
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 & `
.\dotnet-framework-installer.exe /q & `
del .\dotnet-framework-installer.exe & `
powershell Remove-Item -Force -Recurse ${Env:TEMP}\*

# ngen .NET Fx
RUN \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update & `
\Windows\Microsoft.NET\Framework\v4.0.30319\ngen update

# Can't set SHELL prior to installing 4.8 runtime - PowerShell being loaded prevents GAC from getting updated without restart
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Install NuGet CLI
Expand All @@ -22,7 +35,6 @@ RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.c
-ArgumentList `
'--add', 'Microsoft.VisualStudio.Workload.MSBuildTools', `
'--add', 'Microsoft.VisualStudio.Workload.NetCoreBuildTools', `
'--add', 'Microsoft.Net.Component.4.7.2.SDK', `
'--add', 'Microsoft.Component.ClickOnce.MSBuild', `
'--quiet', '--norestart', '--nocache' `
-NoNewWindow -Wait; `
Expand All @@ -32,6 +44,13 @@ RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.c
Remove-Item -Force -Recurse \"${Env:ProgramData}\Microsoft\VisualStudio\Packages\"; `
Remove-Item -Force -Recurse \"${Env:ProgramData}\Package Cache\"

# Install .NET 4.8 SDK
RUN Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/dockerassets/sdk_tools48.zip -OutFile sdk_tools48.zip; `
Expand-Archive sdk_tools48.zip; `
Start-Process msiexec -ArgumentList '/i', 'sdk_tools48\sdk_tools48.msi', '/quiet', 'VSEXTUI=1' -NoNewWindow -Wait; `
Remove-Item -Force -Recurse sdk_tools48; `
Remove-Item -Force -Recurse ${Env:TEMP}\*

# Install web targets
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;`
Expand-Archive MSBuild.Microsoft.VisualStudio.Web.targets.zip -DestinationPath \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\"; `
Expand All @@ -42,9 +61,9 @@ ENV ROSLYN_COMPILER_LOCATION "C:\Program Files (x86)\Microsoft Visual Studio\201
# ngen assemblies queued by VS installers - must be done in cmd shell to avoid access issues
SHELL ["cmd", "/S", "/C"]
RUN `
# Workaround for issue with 32 bit assemblies from Microsoft.Net.Component.4.7.2.SDK being 64 bit ngen'ed
\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\SecAnnotate.exe" `
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\WinMDExp.exe" `
# Workaround for issue with 32 bit assemblies from .NET Framework 4.8 SDK being 64 bit ngen'ed
\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\SecAnnotate.exe" `
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen uninstall "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\WinMDExp.exe" `
`
&& \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update `
`
Expand All @@ -61,11 +80,11 @@ RUN setx /M PATH $(${Env:PATH} `
+ \";${Env:ProgramFiles}\NuGet\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\" `
+ \";${Env:ProgramFiles(x86)}\Microsoft SDKs\ClickOnce\SignTool\")

# Install Targeting Packs
RUN @('4.0', '4.5.2', '4.6.2', '4.7.2') `
RUN @('4.0', '4.5.2', '4.6.2', '4.7.2', '4.8') `
| %{ `
Invoke-WebRequest -UseBasicParsing https://dotnetbinaries.blob.core.windows.net/referenceassemblies/v${_}.zip -OutFile referenceassemblies.zip; `
Expand-Archive referenceassemblies.zip -DestinationPath \"${Env:ProgramFiles(x86)}\Reference Assemblies\Microsoft\Framework\.NETFramework\"; `
Expand Down
16 changes: 16 additions & 0 deletions 4.8/runtime/windowsservercore-1803/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# escape=`

FROM mcr.microsoft.com/windows/servercore:1803

# Install .NET 4.8
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
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 & `
.\dotnet-framework-installer.exe /q & `
del .\dotnet-framework-installer.exe & `
powershell Remove-Item -Force -Recurse ${Env:TEMP}\*

# ngen .NET Fx
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled 0
RUN \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update & `
\Windows\Microsoft.NET\Framework\v4.0.30319\ngen update
16 changes: 16 additions & 0 deletions 4.8/runtime/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# escape=`

FROM mcr.microsoft.com/windows/servercore:ltsc2016

# Install .NET 4.8
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
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 & `
.\dotnet-framework-installer.exe /q & `
del .\dotnet-framework-installer.exe & `
powershell Remove-Item -Force -Recurse ${Env:TEMP}\*

# ngen .NET Fx
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled 0
RUN \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update & `
\Windows\Microsoft.NET\Framework\v4.0.30319\ngen update
16 changes: 16 additions & 0 deletions 4.8/runtime/windowsservercore-ltsc2019/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# escape=`

FROM mcr.microsoft.com/windows/servercore:ltsc2019

# Install .NET 4.8
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
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 & `
.\dotnet-framework-installer.exe /q & `
del .\dotnet-framework-installer.exe & `
powershell Remove-Item -Force -Recurse ${Env:TEMP}\*

# ngen .NET Fx
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled 0
RUN \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update & `
\Windows\Microsoft.NET\Framework\v4.0.30319\ngen update
Loading