Welcome to the Liquidware Community Site.
Current and Future Clients/Partners are Welcome.

Visual Studio 2022 Offline Installation

edited September 2022 in Application Recipes

Similar to other Microsoft products, Visual Studio 2022 has moved away from using a single installation file containing all of the required components to a smaller stub file which downloads the required components during the installation process.

This post provides a summary of the process for both creating a layout to download the installation components prior to packaging and the packaging process itself. For a full breakdown of the process, visit the following Microsoft page - Create an offline installation package of Visual Studio for local installation

  1. Download the desired build of Visual Studio 2022 (Community, Professional, or Enterprise) bootstrapper from - Visual Studio 2022 Release History
  2. Create the initial layout directory to stage the downloaded files, defining the desired component/workload IDs. The command below uses 'ASP.NET and web development' and '.NET desktop development' workloads as an example. For a list of available component/workload IDs, reference - Visual Studio workload and component IDs
    • vs_enterprise.exe --layout C:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --includeOptional --lang en-US
  3. Once the respective workload/component files have been downloaded, launch a cmd prompt and input the installation string, using the command below as an example. Note, all arguments (minus '--layout' and '--lang') should match those provided during the previous step.
    • C:\localVSlayout\vs_enterprise.exe --noweb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --includeOptional
  4. Launch the FlexApp Packaging Console, select 'Create' at the top-left of the console, provide the desired package name, click 'Create', and then click 'Start'.
  5. Once the packaging process has started, switch to the already opened cmd prompt window, and press 'Enter' to initiate the installation process. Note, if you are presented with the error, 'The required webview2 component cannot be installed', ensure 'InstallDefault' is set to '1' under 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\EdgeUpdate'.
  6. After the installation process has completed, click 'Finish' in the FlexApp Packaging Console window, and then click 'Save' to finalize package creation.