content: # escape=`
  
  # Use the latest Windows Server Core 2019 image.
  FROM mcr.microsoft.com/windows/servercore:ltsc2019
  
  # Restore the default Windows shell for correct batch processing.
  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 `
  		--add Microsoft.VisualStudio.Workload.VCTools `
  		--add Microsoft.VisualStudio.Component.VC.CMake.Project `
  		--add Microsoft.VisualStudio.Component.Vcpkg `
  		--add Microsoft.VisualStudio.Component.LanguagePack.1033 `
          --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
  
  # 2) Install CMake
  RUN `
      curl -SL --output cmake.msi https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-windows-x86_64.msi `
      && msiexec.exe /i cmake.msi ALLUSERS=1 ADD_CMAKE_TO_PATH=System /qn /norestart `
      && del /q cmake.msi	