To set up Visual Studio on an offline machine, follow these steps:
-
Download the Visual Studio installer from the Visual Studio page.
-
Create an offline installer using the following command line. In this example, vs_professional.exe is the Professional edition of Visual Studio, and VS2022Offline is the folder where you want to create the layout.
"vs_professional.exe" --LayOut "C:\Temp\VS2022Offline" --Lang "en-US" -
After successfully creating the offline installer for Visual Studio, copy C:\Temp\VS2022Offline to the target offline machine.
-
Once the C:\Temp\VS2022Offline folder is copied to the target offline machine, execute the following command line from an administrator command prompt:
"C:\Temp\VS2022Offline\vs_professional.exe" --noWeb --channelURI "C:\Temp\VS2022Offline\channelManifest.json"For more information on the command-line parameters, see Use command-line parameters to install, update, and manage Visual Studio.
-
Follow the remaining instructions in the setup wizard to complete the installation.
-
Once the installation is completed successfully, open any browser and browse to the Microsoft 365 admin center.
-
Sign in with your Visual Studio subscription account.
-
Navigate to the Downloads and Keys tab.
-
Search for Visual Studio Professional 2022 and select Key.
-
Select the 25-digit volume license key and copy it.
-
Launch the Visual Studio shortcut as an administrator.
-
On the menu bar, select Help > Register Product.
-
Select the Unlock with a Product Key link.
-
Enter the 25-digit product key, and then select Apply.
More information
Create an offline installation package of Visual Studio for local installation
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
