From 1b84d27451e7535fd65e3f312137cfc56b9fe37b Mon Sep 17 00:00:00 2001 From: Dave Dunkin Date: Thu, 16 Nov 2023 09:23:14 -0700 Subject: [PATCH] Install .NET SDKs on Windows runner. --- windows/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/windows/Dockerfile b/windows/Dockerfile index cd768e3..9c5ad6f 100644 --- a/windows/Dockerfile +++ b/windows/Dockerfile @@ -30,6 +30,14 @@ RUN ` && (for %i in ("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\*") do if not "%~nxi" == "vswhere.exe" del "%~i") ` && powershell Remove-Item -Force -Recurse "%TEMP%\*" +# Install supported .NET SDKs +RUN ` + curl -fSLO https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1 ` + && powershell .\dotnet-install.ps1 -Channel 6.0 ` + && powershell .\dotnet-install.ps1 -Channel 7.0 ` + && powershell .\dotnet-install.ps1 -Channel 8.0 ` + && del dotnet-install.ps1 + WORKDIR /actions-runner SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';$ProgressPreference='silentlyContinue';"]