Create a network installation of Visual Studio 2017

Commonly, an enterprise administrator will create a network install point for deployment to client workstations. We've designed Visual Studio 2017 to enable you to cache the files for the initial installation along with all product updates to a single folder (sometimes referred to as creating a layout), so that client workstations can use the same network location to manage their installation even if they haven't yet updated to the latest servicing update.

Note

If you have multiple editions of Visual Studio in use within your enterprise (for example, both Visual Studio Professional and Visual Studio Enteprise), you'll need to create a separate network install share for each edition.

Download the Visual Studio bootstrapper

Download the edition of Visual Studio you want. Make sure to click Save, and then click Open folder.

Your setup executable—or to be more specific, a bootstrapper file—will match one of the following.

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

Other supported bootstrappers include vs_buildtools.exe, vs_feedbackclient.exe, vs_teamexplorer.exe, vs_testagent.exe, vs_testcontroller.exe, and vs_testprofessional.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.

(Make sure that you run the command from your Download directory. Typically, that's C:\Users\<username>\Downloads on a computer that is running Windows 10).

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

Modify the response.json file

You can modify the response.json to set default values that will be used when setup is run. For example, you can configure the response.json file to select a specific set of workloads selected automatically. See Automate Visual Studio installation with a response file for details.

Copy the layout to a network share

Host the layout on a network share so it can be run from other machines.

  • Example:
    xcopy /e c:\vs2017offline \\server\products\VS2017

Customizing the network layout

There are several options you can use to customize your network layout. You can create a partial layout that only contains a specific set of language locales, workloads, components, and their recommended or optional dependencies. This may be useful if you know that you are only going to deploy a subset of workloads to client workstations. Common command-line parameters for customizing the layout include:

  • --add to specify workload or component IDs. If --add is used, only those workloads and components specified with --add will be downloaded. If --add is not used, all workload and components will be downloaded.
  • --includeRecommended to include all the recommended components for the specified workload IDs
  • --includeOptional to include all the recommended and optional components for the specified workload IDs.
  • --lang to specify language locales.

Here are a few examples of how to create a custom partial layout.

  • 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 --includeRecommended
  • To download two workloads and one optional component for three languages, run:
    vs_enterprise.exe --layout C:\vs2017offline --add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Component.GitHub.VisualStudio --includeRecommended --lang en-US de-DE ja-JP
  • To download two workloads and all of their recommended components, run:
    vs_enterprise.exe --layout C:\vs2017offline --add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Component.GitHub.VisualStudio --includeRecommended
  • To download two workloads and all of their recommended and optional components, run:
    vs_enterprise.exe --layout C:\vs2017offline --add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Component.GitHub.VisualStudio --includeOptional

Deploying from a network installation

Administrators may deploy Visual Studio onto client workstations as part of an installation script. Or, users who have administrator rights can run setup directly from the share to install Visual Studio on their machine.

  • Users can install by running:
    \\server\products\VS2017\vs_enterprise.exe
  • Administrators can install in an unattended mode by running:
    \\server\products\VS2017\vs_enterprise.exe --quiet --wait --norestart
Tip

When executed as part of a batch file, the --wait option ensures that the vs_enterprise.exe process waits until the install is completed before returning a exit code. This is useful where an enterprise administrator wants to perform further actions on the completed install (for example, to apply a product key to a successful installation). where one needs to wait for the install to finish to handle the return code from that install. If you do not use --wait, the vs_enterprise.exe process will exit before the install is complete and it will not return an accurate exit code that represents the state of the install operation.

Error codes

If you used the --wait parameter, then depending on the result of the operation, the %ERRORLEVEL% environment variable will be set to one of the following values:

Value Result
0 Operation completed successfully
3010 Operation completed successfully, but install requires reboot before it can be used
Other Failure condition occurred - check the logs for more information

Updating a network install layout

As product updates become available, you may want to update the network install layout to incorporate updated packages.

How to create a layout for a previous Visual Studio 2017 release

Note: The VS 2017 bootstrappers available on http://www.visualstudio.com will download and install the latest VS 2017 release available whenever they are run. If you download a VS bootstrapper today and run it 6 months from now, it will install the VS 2017 release that is available at that later time. If you create a layout, installing VS from that layout will install the specific version of VS that exists in the layout. Even though a newer version may exist online, you will get the version of VS that is in the layout.

If you need to create a layout for an older version of Visual Studio 2017, you can go to https://my.visualstudio.com to download "fixed" versions of the Visual Studio 2017 bootstrappers for supported versions, which will allow you to create a network install layout for that older version.

How to get support for your offline installer

If you experience a problem with your offline installation, we want to know about it. The best way to tell us is by using the Report a Problem tool. When you use this tool, you can send us the telemetry and logs we need to help us diagnose and fix the problem.

We have other support options available, too. For a list of those, see our Talk to us page.

See also