Create an offline installation package of Visual Studio for local installation

Applies to: yesVisual Studio noVisual Studio for Mac noVisual Studio Code

We designed Visual Studio to work well in various network and computer configurations. For all scenarios involving the local machine, we recommend that you use the Visual Studio Installer, which is a small file that checks for updates on a regular basis and helps you stay current with all the latest fixes and features. The information on this page discusses how to create an offline installation package of files for installation on the local machine.

If you are an enterprise IT administrator who wants to perform a deployment of Visual Studio to a network of client workstations, or if you need to create an installation package of files to transfer to or install onto another machine, refer to our Visual Studio Administrators Guide and the Create a network-based installation of Visual Studio documentation.

Use the "Download all, then install" feature

Sometimes online access is problematic. For example, you might have an unreliable internet connection or your internet connection may have low bandwidth. For situations like these, we've made other methods available for acquiring Visual Studio. You can use the Download all, then install feature from the Visual Studio Installer to download an installation package on the local machine before you install, or you can use the command line to create a local installation package to install later.

To download a local installation package, select the Download all, then install option in the dropdown at the bottom of the Workloads tab of the Visual Studio Installer. The purpose of this feature is to frontload the downloading of the Visual Studio packages onto the same computer that you plan on eventually installing Visual Studio on. By downloading the packages locally first, you can then safely disconnect from the internet before you install Visual Studio.

The "Download all, then install" option

Important

The Download all, then install functionality downloads a Visual Studio installation package that is customized to the local machine. Do not try to transfer this downloaded installation package to another computer, as it's not designed to work that way. Instead, if you want to download an installation package and transfer it to or install it on another machine, then you'll need to create a layout as described in the Create a network-based installation of Visual Studio documentation.

You can also configure future updates of this instance of Visual Studio to respect the Download all, then install behavior. For more information, refer to the Customize update settings documentation.

Use the command line to create a local layout

Download the bootstrapper for the edition of Visual Studio you want and copy it into the directory that you want to serve as the source location of your local layout. Once the layout is created, you can use it to install Visual Studio. The bootstrapper is the executable that you use to create, update, and perform other Visual Studio installation operations. You must have an internet connection to complete this.

Step 1 - Download the Visual Studio bootstrapper

The bootstrappers listed below will always install the latest most secure version of Visual Studio 2019, no matter when you run them. Alternatively, if you want to install a specific version of Visual Studio 2019, go to the Visual Studio 2019 Releases page that has links to the fixed version bootstrappers for each servicing release, and download the one you want. Copy it into the directory that you want to serve as the location of your local layout.

Edition Bootstrapper
Visual Studio 2019 Professional version 16.11 vs_professional.exe
Visual Studio 2019 Enterprise version 16.11 vs_enterprise.exe
Visual Studio 2019 Build Tools version 16.11 vs_buildtools.exe

The bootstrappers listed below will always install the latest most secure version of Visual Studio 2022 on the Current channel, no matter when you run them. Alternatively, if you want to install a specific version or a specific channel of Visual Studio 2022, go to the Visual Studio 2022 Release History page that has links to the evergreen and fixed version bootstrappers for each servicing release on each channel, and download the one you want. Copy it into the directory that you want to serve as the location of your local layout.

Edition Bootstrapper
Visual Studio 2022 Community vs_community.exe
Visual Studio 2022 Professional vs_professional.exe
Visual Studio 2022 Enterprise vs_enterprise.exe
Visual Studio 2022 Build Tools vs_buildtools.exe

Tip

If you previously downloaded a specific bootstrapper file and want to verify what version it will install, here's how. In Windows, open File Explorer, right-click the bootstrapper file, choose Properties, choose the Details tab, and then view the Product version number. To match that number to a release of Visual Studio, refer to the table at the bottom of the Visual Studio 2019 Releases page.

Tip

If you previously downloaded a bootstrapper file and want to verify what version it will install, here's how. In Windows, open File Explorer, right-click the bootstrapper file, choose Properties and then choose the Details tab. The Product version field will describe the channel and version that the bootstrapper will install. The version number should always be read as "latest servicing version of what is specified", and the channel is Current unless explicitly specified. So, a bootstrapper with a Product version of LTSC 17.0 will install the latest 17.0.x servicing release that is available on the 17.0 LTSC channel. A bootstrapper with a Product version that simply says Visual Studio 2022 will install the latest version of Visual Studio 2022 on the Current channel.

Step 2 - Create a local layout

You must have an internet connection to complete this step.

Open a command prompt with administrator privileges, navigate to the directory where you downloaded the bootstrapper into, and use the bootstrapper's parameters as defined in the Use command-line parameters to install Visual Studio page to create your local layout. Common examples using the Enterprise bootstrapper are illustrated below and in the command-line parameter examples page. You can install a language other than English by changing en-US to a locale from the list of language locales, and you can use the list of components and workloads to further customize your local layout.

Tip

To prevent an error, make sure that your full installation path is less than 80 characters.

  • For .NET web and .NET desktop development, run:

      vs_enterprise.exe --layout c:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US
    
  • For .NET web and .NET desktop development, run:

      vs_enterprise.exe --layout c:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --includeOptional --lang en-US
    
  • For .NET desktop and Office development, run:

      vs_enterprise.exe --layout c:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Office --includeOptional --lang en-US
    
  • For C++ desktop development, run:

      vs_enterprise.exe --layout c:\localVSlayout --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US
    
  • To create a complete local layout, English only, with all features (this will take a long time—we have lots of features!), run:

      vs_enterprise.exe --layout c:\localVSlayout --lang en-US
    

Note

A complete local layout of Visual Studio requires a minimum of 41 GB of disk space. For more information, see System requirements.

Note

A complete local layout of Visual Studio requires a minimum of 45 GB of disk space. For more information, see System requirements.

Step 3 - Install Visual Studio from the local layout

When you install Visual Studio from a local layout, the Visual Studio installer uses the local versions of the files. But, if you select components during installation that aren't in the layout, then the Visual Studio installer will attempt to download them from the internet. To make sure that you install only the files that you've previously downloaded, use the same command-line options that you used to create the local layout. To make sure your installer doesn't try to access the internet, use the --noweb switch.

For example, if you created a local installation layout with the following command:

vs_enterprise.exe --layout c:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US

Then use this command to run the installation:

c:\localVSlayout\vs_enterprise.exe --noweb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional
vs_enterprise.exe --layout c:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --includeOptional --lang en-US

Then use this command to run the installation:

c:\localVSlayout\vs_enterprise.exe --noweb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --includeOptional

Important

If you're using Visual Studio Community, you must activate it by logging into the product within 30 days of installation. Activation requires an internet connection.

Note

If you get an error that a signature is invalid, you must install updated certificates. Open the Certificates folder in your local layout. Double-click each of the certificate files, and then click through the Certificate Manager wizard. If you're asked for a password, leave it blank.

List of language locales

Language-locale Language
cs-CZ Czech
de-DE German
en-US English
es-ES Spanish
fr-FR French
it-IT Italian
ja-JP Japanese
ko-KR Korean
pl-PL Polish
pt-BR Portuguese - Brazil
ru-RU Russian
tr-TR Turkish
zh-CN Chinese - Simplified
zh-TW Chinese - Traditional

Support or troubleshooting

Sometimes, things can go wrong. If your Visual Studio installation fails, see Troubleshoot Visual Studio installation and upgrade issues for step-by-step guidance.

Here are a few more support options:

  • We also offer an installation chat (English only) support option for installation-related issues.
  • Report product issues to us via the Report a Problem tool that appears both in the Visual Studio Installer and in the Visual Studio IDE. If you're an IT Administrator and don't have Visual Studio installed, you can submit IT Admin feedback here.
  • Suggest a feature, track product issues, and find answers in the Visual Studio Developer Community.

See also