For C++ desktop development, run:
vs_community.exe --layout C:\VS2022Cache --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US
For .NET desktop development, run:
vs_community.exe --layout C:\VS2022Cache --add Microsoft.VisualStudio.Workload.ManagedDesktop --includeOptional --lang en-US
Then use this command to run the installation of C++ desktop development:
C:\VS2022Cache\vs_community.exe --noweb --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended
Then use this command to run the installation of .NET desktop development:
C:\VS2022Cache\vs_community.exe --noweb --add Microsoft.VisualStudio.Workload.ManagedDesktop --includeOptional
- Visual Studio core editor -
Microsoft.VisualStudio.Workload.CoreEditor
- Azure development -
Microsoft.VisualStudio.Workload.Azure
- Data storage and processing -
Microsoft.VisualStudio.Workload.Data
- Data science and analytical applications -
Microsoft.VisualStudio.Workload.DataScience
- .NET desktop development -
Microsoft.VisualStudio.Workload.ManagedDesktop
- Game development with Unity -
Microsoft.VisualStudio.Workload.ManagedGame
- Linux development with C++ -
Microsoft.VisualStudio.Workload.NativeCrossPlat
- Desktop development with C++ -
Microsoft.VisualStudio.Workload.NativeDesktop
- Game development with C++ -
Microsoft.VisualStudio.Workload.NativeGame
- Mobile development with C++ -
Microsoft.VisualStudio.Workload.NativeMobile
- .NET Core cross-platform development -
Microsoft.VisualStudio.Workload.NetCoreTools
- Mobile development with .NET -
Microsoft.VisualStudio.Workload.NetCrossPlat
- ASP.NET and web development -
Microsoft.VisualStudio.Workload.NetWeb
- Node.js development -
Microsoft.VisualStudio.Workload.Node
- Office/SharePoint development -
Microsoft.VisualStudio.Workload.Office
- Python development -
Microsoft.VisualStudio.Workload.Python
- Universal Windows Platform development -
Microsoft.VisualStudio.Workload.Universal
- Visual Studio extension development -
Microsoft.VisualStudio.Workload.VisualStudioExtension
- Documentation for VS2019 - https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019
- Documentation for VS2022 - https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2022&preserve-view=true
- StackOverflow: Creating offline installer for Visual Studio - https://stackoverflow.com/a/43268597