Troubleshooting Visual Studio 2017 installation and upgrade issues

Symptoms

When you try to install or update Visual Studio 2017, the operation fails.

Workaround

To work around this issue, follow these steps.

Step 1 - Check whether this problem is a known issue

There are some known issues with the Visual Studio Installer that Microsoft is working on fixing. Check the Known Issues section of our release notes to see if there's a workaround for your problem.

Step 2 - Check with the developer community

Search on your error message with the Visual Studio Developer Community. Other members of the community may have documented a solution to your problem.

Step 3 - Delete the Visual Studio Installer directory to fix upgrade problems

The Visual Studio Installer bootstrapper is a minimal light-weight executable that installs the rest of the Visual Studio Installer. Deleting Visual Studio Installer files and then rerunning the bootstrapper might solve some update failures.

Note: Performing the following actions reinstalls the Visual Studio Installer files and resets the installation metadata.

  1. Close the Visual Studio Installer.
  2. Delete the Visual Studio Installer directory. Typically, the directory is C:\Program Files (x86)\Microsoft Visual Studio\Installer.
  3. Run the Visual Studio Installer bootstrapper. You may find the bootstrapper in your Downloads folder with a file name that follows a vs_[Visual Studio edition]__*.exe pattern. If you don't find that application, you can download the bootstrapper by going to the Visual Studio downloads page and clicking Download for your edition of Visual Studio. Run the executable to reset your installation metadata.
  4. Try to install or update Visual Studio again. If the Installer continues to fail, go to the next step.

Step 4 - Report a problem

In some situations, such as those related to corrupted files, the problems may have to be looked at on a case-by-case basis:

  1. Collect your setup logs. See How to get the Visual Studio installation logs below for details.
  2. Open the Visual Studio Installer, and then click Report a problem to open the Visual Studio Feedback tool. You can tab to the Provide Feedback button to open the feedback tool
  3. Give your problem report a title, and provide relevant details. Click Next to go to the Attachments section, and then attach the generated log file (typically, the file is at %TEMP%\vslogs.zip). Tab to the Report New Problem button, then follow through the steps
  4. Click Next to review your problem report, and then click Submit.

Step 5 - Run InstallCleanup.exe to clean up installation files

As a last resort, you can clean up Visual Studio to remove all installation files and product information.

  1. Follow the instructions in Clean up Visual Studio.
  2. Rerun the bootstrapper that's described in Step 3 - Delete the Visual Studio Installer directory to fix upgrade problems.
  3. Try to install or update Visual Studio again.

How to troubleshoot an offline installer

Here is a table of known issues and some workarounds when installing from a local layout that might help.

Issue Item Solution
Users do not have access to files. permissions (ACLs) Make sure that you adjust the permissions (ACLs) so that they grant Read access to other users before you share the offline install.
New workloads, components, or languages fail to install. --layout Make sure that you have internet access if you install from a partial layout and select workloads, components, or languages that were not downloaded previously in that partial layout.

How to get the Visual Studio installation logs

Setup logs are needed to troubleshoot most installation issues. When you submit an issue by using Report a Problem in the Visual Studio Installer, these logs are automatically included in your report.

If you contact Microsoft Support, you may need to provide these setup logs by using the Microsoft Visual Studio and .NET Framework Log Collection Tool. The log collection tool collects setup logs from all components installed by Visual Studio 2017, including .NET Framework, Windows SDK, and SQL Server. It also collects computer information, a Windows Installer inventory, and Windows event log information for Visual Studio Installer, Windows Installer, and System Restore.

To collect the logs

  1. Download the tool.
  2. Open an administrative command prompt.
  3. Run Collect.exe from the directory where you saved the tool.
  4. Find the resulting vslogs.zip file in your %TEMP% directory, for example, C:\Users\YourName\AppData\Local\Temp\vslogs.zip.
注意

The tool must be run under the same user account that the failed installation was run under. If you are running the tool from a different user account, set the –user:<name> option to specify the user account under which the failed installation was run. Run Collect.exe -? from an administrator command prompt for additional options and usage information.