Tuesday, March 7, 2017

Create an offline installer for Visual Studio 2017

Download the setup file you want

Edition File
Visual Studio Enterprise vs_enterprise.exe
Visual Studio Professional vs_professional.exe
Visual Studio Community vs_community.exe


Create an offline installation folder

To create an offline installation with all languages and all features, use one of the commands from the following examples. Run cmd in Administrator privilege.

Visual Studio Enterprise vs_enterprise.exe --layout c:\vs2017offline
Visual Studio Professional vs_professional.exe --layout c:\vs2017offline
Visual Studio Community vs_community.exe --layout c:\vs2017offline


Install from the offline installation folder

  1. Install the certificates (They are in the Certificates folder, which is in your Layout folder. Simply right-click each one to install it.)
  2. Run the installation file. For example, run:
    c:\vs2017offline\vs_enterprise.exe


Additional tips for offline installers

There are many options you can use to customize your offline installer. Here are a few examples of how to customize it by language locale

  • To download all workloads and components for only one language, run:
    vs_enterprise.exe --layout C:\vs2017offline --lang en-US
  • To download all workloads and components for multiple languages, run:
    vs_enterprise.exe --layout C:\vs2017offline --lang en-US de-DE ja-JP
  • To download one workload for all languages, run
    vs_enterprise.exe --layout C:\vs2017offline --add Microsoft.VisualStudio.Workload.Azure
  • To download two workloads and one optional component for three languages, run:
    vs_enterprise.exe --layout C:\vs2017offline --add Microsoft.VisualStudio.Workload.Azure Microsoft.VisualStudio.Workload.ManagedDesktop Component.GitHub.VisualStudio --lang en-US de-DE ja-JP
To learn more about the options you can use to customize your installation, see our  Use command-line parameters to install Visual Studio 2017  page.


How to update an offline installer

You might want to update your offline installer at a later date. Here's how.
  • To update a Visual Studio instance that you installed from an offline installation folder, run the Visual Studio Installer, and then click Update.
  • To refresh your offline installation folder so that it includes the latest updates, run the --layout command again. Make sure to point to the same folder that you used before; this way, only those components that have been updated since you last ran --layout will be downloaded.
If you want to update your offline installation, run the  --layout  command again. Make sure to point to the same folder that you used before; this way, only those components that have been updated since you last ran  --layout  will be downloaded.