Create an offline installation of Visual Studio

We designed Visual Studio to work well in various network and computer configurations. We recommend that you use the Visual Studio Installer, which is a small file that checks for online updates on a regular basis and helps you stay current with all the latest fixes and features. However, 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 a few other methods available for acquiring Visual Studio. You can use the Download all, then install feature from the Visual Studio Installer to download the files to a local cache on the local machine before you install, or you can use the command line to create a local cache of the files to install later.

Note

If you are an enterprise IT administrator who wants to perform a deployment of Visual Studio to a network of client workstations, 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

In the Visual Studio Installer, on the Workloads tab, you can select the Download all, then install option in the dropdown at the bottom of the dialog. 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 into a local cache first, you can then safely disconnect from the internet before you install Visual Studio.

The "Download all, then install" option

Important

Do not use the Download all, then install feature to create a local cache that you intend to transfer to another computer. It's not designed to work that way.

You can also configure your updates 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 cache

You can download a small bootstrapper file, and then use the command line to create a local cache. Once the cache is created, you can use it to install Visual Studio.

Step 1 - Download the Visual Studio bootstrapper

You must have an internet connection to complete this step.

To get the latest bootstrappers for Visual Studio 2017 version 15.9, download one of the files below. These bootstrappers will always install the latest version of Visual Studio 2017, no matter when you run them.

Edition Bootstrapper
Visual Studio 2017 Professional version 15.9 vs_professional.exe
Visual Studio 2017 Enterprise version 15.9 vs_enterprise.exe
Visual Studio 2017 Build Tools version 15.9 vs_buildtools.exe

To get the latest bootstrappers for Visual Studio 2019 that will always install the latest version of 16.11, download one of the files below. 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.

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

To get the latest bootstrappers for Visual Studio 2022 that will always install the latest version of the Current channel, download one of the files below. 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 fixed version bootstrappers for each servicing release.

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 from the Visual Studio 2019 Releases page 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 that 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 install cache

You must have an internet connection to complete this step.

Open a command prompt and use the bootstrapper's parameters as defined in the Use command-line parameters to install Visual Studio page to create your local installation cache. 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 cache.

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:\localVScache --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:\localVScache --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:\localVScache --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Office --includeOptional --lang en-US
    
  • For C++ desktop development, run:

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

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

Note

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

Note

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

Note

A complete local cache 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 cache

When you install Visual Studio from a local install cache, the Visual Studio installer uses the local cached versions of the files. But, if you select components during installation that aren't in the cache, 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 cache. To make sure your installer doesn't try to access the internet, use the --noweb switch.

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

vs_enterprise.exe --layout c:\localVScache --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:\localVScache\vs_enterprise.exe --noweb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional
vs_enterprise.exe --layout c:\localVScache --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --includeOptional --lang en-US

Then use this command to run the installation:

c:\localVScache\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 cache. 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

Get support

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