For enterprise build farms, offline layouts are the gold standard. Here is a complete PowerShell script to create, verify, and deploy an offline layout.
vs_buildtools.exe --config config.vsconfig --quiet Here are essential IDs for Build Tools 2022 (latest as of 2024–2025):
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:
Introduction In modern software development, continuous integration and build automation are paramount. While most developers are familiar with the full Visual Studio IDE, many build servers, CI/CD pipelines (like Jenkins, Azure DevOps, or GitHub Actions), and containerized environments do not require—or want—the overhead of a full graphical user interface. Enter Visual Studio Build Tools 2022 .
if ($LASTEXITCODE -eq 0) Write-Host "Installation successful" else Write-Host "Installation failed with exit code $LASTEXITCODE"
(run on internet-connected machine):
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:
vs_buildtools.exe --layout C:\vs2022_buildtools_offline ^ --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools ^ --add Microsoft.VisualStudio.Workload.MSBuildTools ^ --lang en-US