C:\vs2022_buildtools_offline\vs_buildtools.exe The UI will open, but all packages are loaded from the local layout – no internet required. | Argument | Effect | |----------|--------| | --quiet | No UI, no prompts. | | --passive | Shows progress bar but no interaction. | | --wait | Process exits only after installation completes. | | --norestart | Suppress automatic reboots. | | --installPath <path> | Target directory (default: Program Files). | | --add <ID> | Install specific workload/component. | | --remove <ID> | Uninstall a workload. | | --includeRecommended | Include recommended components. | | --includeOptional | Include optional components (rarely used). | Part 5: Maintaining and Updating Your Offline Layout The biggest challenge with offline installers is keeping them patched. Microsoft releases updates monthly (security fixes, new SDKs, toolchain improvements). Updating an Existing Layout Run the same layout command on the machine that holds the original layout (the one with internet access):
vs_buildtools.exe --layout C:\vs2022_buildtools_offline --export config.vsconfig The config.vsconfig JSON file contains the list of workloads/components. You can later install using: visual studio build tools 2022 offline installer
For enterprise build farms, offline layouts are the gold standard. Here is a complete PowerShell script to create, verify, and deploy an offline layout. C:\vs2022_buildtools_offline\vs_buildtools
FROM mcr.microsoft.com/windows/servercore:ltsc2022 COPY ./vs2022_buildtools_offline C:/vs_layout RUN C:/vs_layout/vs_buildtools.exe --quiet --wait --norestart --installPath C:/BuildTools --add Microsoft.VisualStudio.Workload.VCTools Use --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 instead of full workload for smaller container size. 3. Generating a Bootstrapper for Distribution You can create a self-contained vs_buildtools.exe that references your layout: | | --wait | Process exits only after installation completes
C:\vs2022_layouts\ 2024-Q1\ 2024-Q2\ 2024-Q3\ Then update your build agent provisioning scripts to point to the latest frozen version. To reproduce the exact same layout on another machine or for documentation:
Full list: Run vs_buildtools.exe --list in an online environment. 1. Offline Installation on Windows Server Core Windows Server Core has no GUI. You must use the silent installer: