Skip to content

Commit

Permalink
Update the Roslyn to 3.6.0 (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjie-Liu authored Jul 13, 2021
1 parent 6d6cae8 commit 0425e8b
Show file tree
Hide file tree
Showing 12 changed files with 143 additions and 23 deletions.
13 changes: 11 additions & 2 deletions eng/dockerfile-templates/aspnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:IIS-WebServerRole {{if
&& %windir%\Microsoft.NET\Framework\v4.0.30319\ngen update
{{if PRODUCT_VERSION != "3.5"
:
# Install Roslyn compilers
# Install 2.9.0 Roslyn compilers
RUN curl -fSLo microsoft.net.compilers.2.9.0.zip https://api.nuget.org/packages/microsoft.net.compilers.2.9.0.nupkg `
&& mkdir C:\RoslynCompilers `
&& tar -C C:\RoslynCompilers -zxf microsoft.net.compilers.2.9.0.zip `
Expand All @@ -23,7 +23,16 @@ RUN curl -fSLo microsoft.net.compilers.2.9.0.zip https://api.nuget.org/packages/
&& %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers\tools\vbc.exe /ExeConfig:C:\RoslynCompilers\tools\vbc.exe `
&& %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers\tools
# Install 3.6.0 Roslyn compilers
RUN curl -fSLo microsoft.net.compilers.3.6.0.zip https://api.nuget.org/packages/microsoft.net.compilers.3.6.0.nupkg `
&& mkdir C:\RoslynCompilers-3.6.0 `
&& tar -C C:\RoslynCompilers-3.6.0 -zxf microsoft.net.compilers.3.6.0.zip `
&& del microsoft.net.compilers.3.6.0.zip `
&& %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe `
&& %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe `
&& %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers-3.6.0\tools
}}
EXPOSE 80

Expand Down
16 changes: 14 additions & 2 deletions eng/dockerfile-templates/aspnet/Dockerfile.pre20H2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN Add-WindowsFeature Web-Server; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen update; `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen update

# Install Roslyn compilers
# Install 2.9.0 Roslyn compilers
RUN {{if OS_VERSION_NUMBER = "ltsc2016":[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
}}Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.9.0.nupkg -OutFile C:\microsoft.net.compilers.2.9.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.2.9.0.zip -DestinationPath C:\RoslynCompilers; `
Expand All @@ -27,7 +27,19 @@ RUN {{if OS_VERSION_NUMBER = "ltsc2016":[Net.ServicePointManager]::SecurityProto
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\vbc.exe /ExeConfig:C:\RoslynCompilers\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers\tools\VBCSCompiler.exe}}

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers\tools
# Install 3.6.0 Roslyn compilers
RUN {{if OS_VERSION_NUMBER = "ltsc2016":[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
}}Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.3.6.0.nupkg -OutFile C:\microsoft.net.compilers.3.6.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.3.6.0.zip -DestinationPath C:\RoslynCompilers-3.6.0; `
Remove-Item C:\microsoft.net.compilers.3.6.0.zip -Force; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe{{if OS_VERSION_NUMBER != "2004": | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe}}

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers-3.6.0\tools

EXPOSE 80

Expand Down
16 changes: 14 additions & 2 deletions src/aspnet/4.6.2/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN Add-WindowsFeature Web-Server; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen update; `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen update

# Install Roslyn compilers
# Install 2.9.0 Roslyn compilers
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.9.0.nupkg -OutFile C:\microsoft.net.compilers.2.9.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.2.9.0.zip -DestinationPath C:\RoslynCompilers; `
Expand All @@ -26,7 +26,19 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\vbc.exe /ExeConfig:C:\RoslynCompilers\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers\tools
# Install 3.6.0 Roslyn compilers
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.3.6.0.nupkg -OutFile C:\microsoft.net.compilers.3.6.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.3.6.0.zip -DestinationPath C:\RoslynCompilers-3.6.0; `
Remove-Item C:\microsoft.net.compilers.3.6.0.zip -Force; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers-3.6.0\tools

EXPOSE 80

Expand Down
16 changes: 14 additions & 2 deletions src/aspnet/4.7.1/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN Add-WindowsFeature Web-Server; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen update; `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen update

# Install Roslyn compilers
# Install 2.9.0 Roslyn compilers
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.9.0.nupkg -OutFile C:\microsoft.net.compilers.2.9.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.2.9.0.zip -DestinationPath C:\RoslynCompilers; `
Expand All @@ -26,7 +26,19 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\vbc.exe /ExeConfig:C:\RoslynCompilers\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers\tools
# Install 3.6.0 Roslyn compilers
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.3.6.0.nupkg -OutFile C:\microsoft.net.compilers.3.6.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.3.6.0.zip -DestinationPath C:\RoslynCompilers-3.6.0; `
Remove-Item C:\microsoft.net.compilers.3.6.0.zip -Force; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers-3.6.0\tools

EXPOSE 80

Expand Down
16 changes: 14 additions & 2 deletions src/aspnet/4.7.2/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN Add-WindowsFeature Web-Server; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen update; `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen update

# Install Roslyn compilers
# Install 2.9.0 Roslyn compilers
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.9.0.nupkg -OutFile C:\microsoft.net.compilers.2.9.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.2.9.0.zip -DestinationPath C:\RoslynCompilers; `
Expand All @@ -26,7 +26,19 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\vbc.exe /ExeConfig:C:\RoslynCompilers\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers\tools
# Install 3.6.0 Roslyn compilers
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.3.6.0.nupkg -OutFile C:\microsoft.net.compilers.3.6.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.3.6.0.zip -DestinationPath C:\RoslynCompilers-3.6.0; `
Remove-Item C:\microsoft.net.compilers.3.6.0.zip -Force; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers-3.6.0\tools

EXPOSE 80

Expand Down
15 changes: 13 additions & 2 deletions src/aspnet/4.7.2/windowsservercore-ltsc2019/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN Add-WindowsFeature Web-Server; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen update; `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen update

# Install Roslyn compilers
# Install 2.9.0 Roslyn compilers
RUN Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.9.0.nupkg -OutFile C:\microsoft.net.compilers.2.9.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.2.9.0.zip -DestinationPath C:\RoslynCompilers; `
Remove-Item C:\microsoft.net.compilers.2.9.0.zip -Force; `
Expand All @@ -24,7 +24,18 @@ RUN Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.9
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\vbc.exe /ExeConfig:C:\RoslynCompilers\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers\tools
# Install 3.6.0 Roslyn compilers
RUN Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.3.6.0.nupkg -OutFile C:\microsoft.net.compilers.3.6.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.3.6.0.zip -DestinationPath C:\RoslynCompilers-3.6.0; `
Remove-Item C:\microsoft.net.compilers.3.6.0.zip -Force; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers-3.6.0\tools

EXPOSE 80

Expand Down
16 changes: 14 additions & 2 deletions src/aspnet/4.7/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN Add-WindowsFeature Web-Server; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen update; `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen update

# Install Roslyn compilers
# Install 2.9.0 Roslyn compilers
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.9.0.nupkg -OutFile C:\microsoft.net.compilers.2.9.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.2.9.0.zip -DestinationPath C:\RoslynCompilers; `
Expand All @@ -26,7 +26,19 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\vbc.exe /ExeConfig:C:\RoslynCompilers\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers\tools
# Install 3.6.0 Roslyn compilers
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.3.6.0.nupkg -OutFile C:\microsoft.net.compilers.3.6.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.3.6.0.zip -DestinationPath C:\RoslynCompilers-3.6.0; `
Remove-Item C:\microsoft.net.compilers.3.6.0.zip -Force; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers-3.6.0\tools

EXPOSE 80

Expand Down
12 changes: 10 additions & 2 deletions src/aspnet/4.8/windowsservercore-2004/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@ RUN Add-WindowsFeature Web-Server; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen update; `
&$Env:windir\Microsoft.NET\Framework\v4.0.30319\ngen update

# Install Roslyn compilers
# Install 2.9.0 Roslyn compilers
RUN Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.9.0.nupkg -OutFile C:\microsoft.net.compilers.2.9.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.2.9.0.zip -DestinationPath C:\RoslynCompilers; `
Remove-Item C:\microsoft.net.compilers.2.9.0.zip -Force; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers\tools\csc.exe /ExeConfig:C:\RoslynCompilers\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers\tools\vbc.exe /ExeConfig:C:\RoslynCompilers\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers\tools
# Install 3.6.0 Roslyn compilers
RUN Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.3.6.0.nupkg -OutFile C:\microsoft.net.compilers.3.6.0.zip; `
Expand-Archive -Path C:\microsoft.net.compilers.3.6.0.zip -DestinationPath C:\RoslynCompilers-3.6.0; `
Remove-Item C:\microsoft.net.compilers.3.6.0.zip -Force; `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\csc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\csc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\vbc.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\vbc.exe | `
&$Env:windir\Microsoft.NET\Framework64\v4.0.30319\ngen install C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe /ExeConfig:C:\RoslynCompilers-3.6.0\tools\VBCSCompiler.exe

ENV ROSLYN_COMPILER_LOCATION=C:\RoslynCompilers-3.6.0\tools

EXPOSE 80

Expand Down
Loading

0 comments on commit 0425e8b

Please sign in to comment.