Condividi tramite


Update a Visual Studio client that was installed from a network layout

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

You can and should periodically update all Visual Studio clients so that they receive the latest security and functionality fixes.

If the Visual Studio client was originally installed via a network layout, then most likely the client machine is part of a "managed environment" meaning that it is governed by a central administrative team and must adhere to organizational policies. To update client machines in a managed environment consider the questions below whose answers will inform how you should approach the update process.

  • Where are the updates coming from: a network layout or Microsoft hosted servers? And if the update is coming from a network layout, is the network layout prepared?
  • Is the update going to be initiated by the user, or is it an administrator initiated event? Remember that whoever performs the update must have administrator permissions on the client machine.

Prepare the update source

If you are going to update your client from Microsoft hosted servers, then the client will download and install the latest version available from Microsoft on that channel.

If you are going to update your client from a network layout, then the first step is to prepare the network layout with the updated product. You can update your existing layout with the latest product updates so both new installations and updates will receive the updated version. Or, you can create a whole new layout in a different directory that you can use for updating the client machines.

Enable manual user-initiated client-side updates

A user on the client machine with sufficient permissions can manually initiate the Visual Studio update themselves. The Visual Studio client must be configured properly to look in the right source location for updates so that it can recognize that an update is available. If any files are in use when the update happens, like if Visual Studio is open, then Visual Studio will need to close to complete the update. Occasionally an update will require a reboot.

Manually configure where the Visual Studio client looks for updates

When Visual Studio is initially installed on the client machine, it records the location where it should check for updates. If Visual Studio was installed from Microsoft hosted servers, then it will by default look for updates from Microsoft hosted servers. If Visual Studio was installed or updated by invoking a bootstrapper on a network layout, then it will look for updates in the location specified by the layout.

In Visual Studio 2017, once the client has installed the product, the client's update location configuration is locked and unchangable. In order to configure a different source location for updates, you will need to uninstall and reinstall the product using the correct layout configuration.

Update notifications

If there is an update available in the location that the client is looking for updates, then the client will pop a message or a notification flag.

For details on how to control when update notifications are presented to users, see Control updates to network-based Visual Studio deployments.

Manually initiate the update

Users can manually update a Visual Studio instance by:

  • launching the Visual Studio Installer. If an update is available, they can click Update.
  • launching the Visual Studio IDE and responding to the notification flag or message, or choosing Help/Check for updates.

Programatically update the client machines

Administrators can programmatically update the client installations of Visual Studio by either issuing the commands to the client-side installer, or by invoking a bootstrapper in the layout.

Programatically update Visual Studio by using the Visual Studio Installer

You can initiate an update to Visual Studio by programmatically invoking the client's installer and issuing the update command. For example:

c:\program files (x86)\microsoft\visual studio\installer\>setup.exe update --installPath "C:\Program Files\Microsoft Visual Studio\2017\Enterprise" 

Programatically update Visual studio by using a bootstrapper.

You can update Visual Studio by programatically calling a bootstrapper from the same location that you originally installed from. All bootstrappers sourced from Microsoft hosted servers are considered from the same location. If your bootstrapper was on a network layout share, then the network layout must be updated to contain the desired product updates.

\\server\share\originalinstallVSdirectory\vs_enterprise.exe update --installPath "C:\clientmachine\installpath" --quiet 

Note

Use the vswhere.exe command to identify the install path of an existing instance of Visual Studio on a client machine.

Programatically update a client that doesn't have internet access

If your client machine doesn't have internet access, then it must acquire the updates from a network layout. Remember that there are two parts that need to get updated whenever Visual Studio is updated. The first is the installer and the second is the Visual Studio product itself. You can instruct Visual Studio to explicitly look for both of these components from the network layout by running these commands on the client machine. The first command forces the installer to come from the layout, and the second command prevents any packages from being downloaded from Microsoft hosted servers on the internet.

   \\server\share\VSlayoutdirectory\vs_enterprise.exe --quiet --update
   \\server\share\VSlayoutdirectory\vs_enterprise.exe update --installPath "C:\clientmachine\installpath" --noWeb --wait --quiet --norestart

Another way to ensure that the client gets its updates from the network layout is to pass in the --noweb and --noUpdateInstaller options in a single command to the bootstrapper on the network layout. The former prevents downloading updated workloads, components from the internet, and the latter prevents the installer from self-updating. This option, while available, is generally not recommended because you should always be using the latest and greatest installer.

Important

The --noWeb option does not stop Visual Studio setup on an internet-connected computer from checking for updates. Rather, it prevents the client from downloading the product packages.

Get support for your network layout

If you experience a problem with your network layout, we want to know about it. The best way to tell us is by using 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. When you use this tool, it would be very helpful if you could send the logs from the VS Collect tool which can help us diagnose and fix the problem.

We also offer an installation chat (English only) support option for installation-related issues.

We have other support options available, too. See our Visual Studio Developer Community.

See also