Create an offline installation of Visual Studio
Important
Do not use the “Download all, then install” feature to create an offline cache that you intend to transfer to another computer. It’s not designed to work that way.
Use the command line to create a local cache
After you download a small bootstrapper, use the command line to create a local cache. Then, use the local cache to install Visual Studio. (This process replaces the ISO files that were available for previous versions.)
Here’s how.
Step 1 – Download the Visual Studio bootstrapper
Start by downloading the Visual Studio bootstrapper for your chosen edition of Visual Studio. Your setup file—or bootstrapper—will match or be similar to one of the following.
Edition | File |
---|---|
Visual Studio Community | vs_community.exe |
Visual Studio Professional | vs_professional.exe |
Visual Studio Enterprise | vs_enterprise.exe |
Visual Studio Build Tools | vs_buildtools.exe |
Step 2 – Create a local install cache
Open a command prompt and use one of the commands from the following examples. The examples that are listed here assume that you’re using the Professional edition of Visual Studio; adjust the command as appropriate for your edition.
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_professional.exe –layout c:\vslayout –add Microsoft.VisualStudio.Workload.ManagedDesktop –add Microsoft.VisualStudio.Workload.NetWeb –add Component.GitHub.VisualStudio –includeOptional –lang en-US
- For .NET desktop and Office development, run:
vs_
professional.exe –layout c:\vslayout –add Microsoft.VisualStudio.Workload.ManagedDesktop –add Microsoft.VisualStudio.Workload.Office –includeOptional –lang en-US - For C++ desktop development, run:vs_professional.exe –layout c:\vslayout –add Microsoft.VisualStudio.Workload.NativeDesktop –includeRecommended –lang en-US
- To create a complete local layout with all features (this will take a long time—we have lots of features!), run:
vs_
professional.exe –layout c:\vslayout –lang en-US
A complete Visual Studio layout requires a minimum of 35 GB of disk space. For more information, see System requirements. And for information about how to create a layout with only the components you want to install, see Use command-line parameters to install Visual Studio.
If you want to install a language other than English, change en-US
to a locale from the List of language locales. Then, use the list of the components and workloads available to further customize your installation cache.
Step 3 – Install Visual Studio from the local cache
When you run from a local install cache, setup uses the local versions of each of these files. But if you select components during installation that aren’t in the cache, setup attempts to download them from the internet.
For offline installations, if you get an error message that says “A product matching the following parameters cannot be found”, make sure that you are using the --noweb
switch with version 16.3.5 or later.
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 layout cache. For example, if you created a layout cache with the following command:
vs_professional.exe --layout c:\vslayout --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:\vslayout\vs_professional.exe --noweb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional
For more examples of how to use command-line parameters, see the Command-line parameter examples for Visual Studio installation page.
If you get an error that a signature is invalid, you must install updated certificates. Open the Certificates folder in your offline 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 |