vs_enterprise.exe --layout . --noweb --config InstallConfig.json Example InstallConfig.json :
$Workloads = @( "Microsoft.VisualStudio.Workload.ManagedDesktop", "Microsoft.VisualStudio.Workload.NetWeb", "Microsoft.VisualStudio.Workload.NativeDesktop" ) $LayoutPath = "D:\VS2022_Layout" $Bootstrapper = "vs_enterprise.exe" & $Bootstrapper --layout $LayoutPath --lang en-US --includeRecommended ` ($Workloads | ForEach-Object "--add $_" ) --useLatestInstaller --wait
"version": "1.0", "components": [ "Microsoft.VisualStudio.Workload.ManagedDesktop", "Microsoft.VisualStudio.Component.CSharp" ], "locale": "en-US"
Use --add with specific component IDs (not workloads) to trim size further. CreateLayout.ps1
if ($LASTEXITCODE -eq 0) Write-Host "Layout created successfully at $LayoutPath" else Write-Error "Layout creation failed with exit code $LASTEXITCODE"
$LayoutPath = "\\buildserver\VS2022_Layout" $Features = @("Microsoft.VisualStudio.Workload.ManagedDesktop") & "$LayoutPath\vs_enterprise.exe" --noweb --quiet --wait ` ($Features | ForEach-Object "--add $_" ) ` --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" The Visual Studio 2022 offline installer is a robust, enterprise-ready solution for managing development environments without live internet. It requires careful initial planning around workload selection, storage, and update cycles but offers deterministic, secure, and repeatable installations. For large organizations, combining an offline layout with a network share, scheduled refresh jobs, and deployment scripts provides full lifecycle management of Visual Studio across hundreds of air-gapped or bandwidth-limited machines.