Skip to content

Instantly share code, notes, and snippets.

@bardic
Last active December 8, 2024 08:08
Show Gist options
  • Select an option

  • Save bardic/9a12f5276166452e22406d54fbee0837 to your computer and use it in GitHub Desktop.

Select an option

Save bardic/9a12f5276166452e22406d54fbee0837 to your computer and use it in GitHub Desktop.
GameCI with MSBuild Env
# Based on https://learn.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2022#create-and-build-the-dockerfile
# and
# https://game.ci/docs/docker/customize-docker-images
# escape=`
FROM unityci/editor:windows-6000.0.30f1-windows-il2cpp-3.1.0
SHELL ["cmd", "/S", "/C"]
RUN `
# Download the Build Tools bootstrapper.
curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
`
# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.
&& (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\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 `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
`
# Cleanup
&& del /q vs_buildtools.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment