Skip to content

Commit

Permalink
Use components from an export of a local install. Still, compiler is …
Browse files Browse the repository at this point in the history
…not recognized. Ref #21.
  • Loading branch information
jaraco committed Jul 6, 2021
1 parent e04c920 commit 1fc4d77
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
# Download the Build Tools bootstrapper.
ADD https://aka.ms/vs/16/release/vs_buildtools.exe vs_buildtools.exe

# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload.
# Exclude workloads and components with known issues.
RUN ./vs_buildtools.exe --quiet --wait --norestart --nocache --installPath C:\BuildTools --add Microsoft.VisualStudio.Workload.AzureBuildTools --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Windows81SDK
# Install Visual Studio
RUN ./vs_buildtools.exe --quiet --wait --norestart --nocache \
--add Microsoft.VisualStudio.Component.CoreEditor \
--add Microsoft.VisualStudio.Workload.CoreEditor \
--add Microsoft.VisualStudio.Component.Roslyn.Compiler \
--add Microsoft.Component.MSBuild \
--add Microsoft.VisualStudio.Component.TextTemplating \
--add Microsoft.VisualStudio.Component.VC.CoreIde \
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 \
--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest \
--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core \
--add Microsoft.VisualStudio.Workload.NativeDesktop

# Install chocolatey
RUN powershell -c "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex"
Expand Down

0 comments on commit 1fc4d77

Please sign in to comment.