To list available IDs:
echo Offline layout created at %LAYOUT_PATH% pause visual studio 2022 offline download
vs_<Edition>.exe --layout <path_to_offline_folder> --add <workload_or_component_ID> --includeRecommended --includeOptional --lang <language_code> To list available IDs: echo Offline layout created
vs_Community.exe --layout C:\VS2022_Offline --add Microsoft.VisualStudio.Workload.ManagedDesktop --lang en-US Repeat for multiple
vs_Enterprise.exe --layout D:\VS2022_Full_Offline --all --lang en-US de-DE fr-FR ja-JP zh-CN
vs_Professional.exe --layout E:\VS2022_CPP_Unity --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.ManagedGame --includeRecommended --includeOptional --lang en-US | Flag | Purpose | |------|---------| | --layout | Destination folder for offline cache. | | --add | Include a specific workload or component. Use --list first to see IDs. | | --includeRecommended | Download recommended optional components for each workload. | | --includeOptional | Download all optional components (⚠️ greatly increases size). | | --lang | Language packs (e.g., en-US , de-DE ). Repeat for multiple. | | --all | Download everything – all workloads, components, and languages. | | --useLatestInstaller | Force download of the newest installer engine. | Step 4: Wait for download completion The process can take from minutes to hours depending on your selection and bandwidth. Progress is shown in the console. Step 5: Transfer the offline folder Copy the entire folder (e.g., C:\VS2022_Offline ) to a USB drive, network share, or external HDD. Method 2: Creating an Offline Installer for a Single Machine If you only need to reinstall on the same machine (e.g., after reformatting), you can create a layout that matches your current installation. Step 1: Export your current workload/components Open an elevated Command Prompt and run: