Uredi

Deli z drugimi prek


Troubleshoot Visual Studio installation and upgrade issues

Applies to: Visual Studio

This troubleshooting guide includes step-by-step instructions to resolve common issues with Visual Studio installation and upgrade.

Tip

Having a problem installing? We can help. We offer an installation chat (English only) support option.

Online installations or updates

Try the following possible resolutions that apply to a typical online installation issue in order.

1. Check whether the problem is a known issue

The first thing to check is whether or not the issue you're encountering is a known issue with the Visual Studio Installer that Microsoft is working on fixing.

To see if there's a workaround for your problem, check Known Issues of Visual Studio 2019 and Known Issues of Visual Studio 2022.

2. Try repairing Visual Studio

Try to repair your installation. It may fix many common update issues.

3. See what the developer community says about the error

If repairing didn't fix the issue, search for your error message in the Visual Studio Developer Community. Other members of the community might have found a solution or workaround to your problem.

4. Delete the installer folder (update issues)

If you encountered an issue when updating, try deleting the Visual Studio Installer folder, and then rerunning the installation bootstrapper can solve certain update failures. Doing so reinstalls the Visual Studio Installer files and resets the installation metadata.

  1. Close the Visual Studio Installer.
  2. Delete the Visual Studio Installer folder. Typically, the folder path is C:\Program Files (x86)\Microsoft Visual Studio\Installer.
  3. Run the Visual Studio Installer bootstrapper. You might find the bootstrapper in your Downloads folder with a file name VisualStudioSetup.exe (Visual Studio 2022) or vs_<edition>*.exe (Visual Studio 2019 and previous versions). Or, you can download the bootstrapper from the download pages for Visual Studio 2022 or Visual Studio 2019 and previous versions. Then, run the executable to reset your installation metadata.
  4. Try to install or update Visual Studio again. If the Visual Studio Installer continues to fail, report a problem to support.

5. Report the problem to support

In some situations, when there are corrupted files, issues might require case-by-case troubleshooting.

Follow these steps to submit the problem to Microsoft Support:

  • For Visual Studio 2022:

    1. Collect your setup logs. See How to get the Visual Studio installation logs for details.

    2. Open the Visual Studio Installer, and then choose Report a problem to open the Visual Studio Feedback tool.

      Screenshot showing the Provide feedback button in the Visual Studio Installer.

    3. Give your problem report a title, and provide the relevant details. The most recent setup log for the Visual Studio Installer is automatically added to the Additional attachments section of your problem report.

    4. Choose Submit.

  • For Visual Studio 2019 and previous versions:

    1. Collect your setup logs. See How to get the Visual Studio installation logs for details.
    2. Open the Visual Studio Installer, and then select Report a problem to open the Visual Studio Feedback tool.
    3. Give your problem report a title, and provide relevant details. Select Next to go to the Attachments section, and then attach the generated log file (typically, the file is at %TEMP%\vslogs.zip).
    4. Select Next to review your problem report, and then select Submit.

6. Remove all Visual Studio installation files

As a last resort, you can remove all Visual Studio installation files and product information:

  1. Remove all with InstallCleanup.exe.
  2. Rerun the Visual Studio Installer bootstrapper. You might find the bootstrapper in your Downloads folder with a file name VisualStudioSetup.exe (Visual Studio 2022) or vs<edition>*.exe_ (Visual Studio 2019 and previous versions). Or, you can download the bootstrapper from the download pages for Visual Studio 2022 or Visual Studio 2019 and previous versions.
  3. Try to reinstall Visual Studio.

7. Roll back to a previous install (for Visual Studio 2022 only)

Before you try to roll back, learn more about the rollback feature in Visual Studio.

If none of the previous steps helped you successfully upgrade Visual Studio, you can try to roll back to your previously installed version. Since Visual Studio 2022 version 17.4, you can roll back to your previously installed version if your original version was on the current channel version 17.1.7 or higher, or on the 17.0 Fall 2021 LTSC channel 17.0.10 or higher.

You can roll back to your previously installed version by using the Visual Studio Installer or by using the command line.

Important

If you're in an organization and are using a layout to update Visual Studio, your IT Administrator is expected to maintain the previous packages in the layout if the client is expected to be able to roll back. Also, rollback may be disabled or your rollback attempt may be undone if you're in an organization that has security compliance or software updating requirements. Contact your IT Administrator for further details.

To roll back with the Visual Studio Installer, follow these steps:

  1. Launch the Visual Studio Installer on your computer.

  2. In the installer, look for the edition of Visual Studio that you installed.

  3. Select More.

  4. Select Rollback to previous version.

    Screenshot of the Rollback to previous version option.

  5. Select OK to confirm.

8. Contact our live chat

If none of the previous steps help you successfully install or upgrade Visual Studio, contact us by using our live chat support option (English only) for further assistance.

Network layout or offline installations

To resolve issues with a network installation, see Error Codes or Troubleshoot network-related errors when you install or use Visual Studio.

Administrator updates

Administrator updates may not be applied correctly due to various situations. For more information, see Administrator updates troubleshooting error codes.

You can use the following methods to provide feedback about Visual Studio administrator updates or report issues that affect the updates:

Collect installation logs for Microsoft Support

If you contact Microsoft Support, you might be asked to collect 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, including .NET Framework, Windows SDK, and SQL Server. It also collects computer information, a Windows Installer inventory, and Windows event log information for the Visual Studio Installer, Windows Installer, and System Restore.

To collect the logs, follow these steps:

  1. Download the tool.

  2. Open an administrative command prompt.

  3. Run Collect.exe in the folder where you saved the tool.

    The tool must be run under the same user account that the failed installation was run under. If you're 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 more options and usage information.

The tool generates a vslogs.zip file in your %TEMP% folder, typically at C:\Users\YourName\AppData\Local\Temp\vslogs.zip.

Report product issues to us using the Report a Problem tool that appears both in the Visual Studio Installer and in the Visual Studio IDE. If you are an IT Administrator and don't have Visual Studio installed, you can submit IT Admin feedback here.

Problems installing WebView2

If your organization's Group policies block the installation of the WebView2 component, you won't be able to install Visual Studio because the installer requires WebView2 to be installed. If this happens, check these policies:

Warning

If neither policy is configured, WebView2 installation is allowed by your organization.