Uredi

Deli z drugimi prek


Install Visual Studio versions side-by-side

You can install Visual Studio on a computer that has an earlier or later major version of Visual Studio already installed.

Before you install versions side-by-side, review the following conditions:

  • Suppose that you use Visual Studio 2019 to open a solution that was created in Visual Studio 2017. You can later open and modify the solution in the earlier version unless you implement features that are specific to Visual Studio 2019.

  • Suppose that you use Visual Studio 2019 to open a solution that was created in Visual Studio 2017 or an earlier version. You might need to modify your projects and files to be compatible with Visual Studio 2019. For more information, see Port, migrate, and upgrade Visual Studio Projects.

Before you install versions side-by-side, review the following conditions:

  • Suppose that you use Visual Studio 2022 to open a solution that was created in Visual Studio 2017 or Visual Studio 2019. You can later open and modify the solution again in the earlier version unless you implement features that are specific to Visual Studio 2022.

  • Suppose that you use Visual Studio 2022 to open a solution that was created in Visual Studio 2019 or an earlier version. You might need to modify your projects and files to be compatible with Visual Studio 2022. For more information, see Port, migrate, and upgrade Visual Studio Projects.

  • If you uninstall a version of Visual Studio on a computer that has more than one version installed, the file associations for Visual Studio are removed for all versions.

  • Visual Studio doesn't automatically upgrade extensions because not all extensions are compatible. You must reinstall the extensions from the Visual Studio Marketplace or the software publisher.

Install different editions of the same major Visual Studio version side-by-side

Each installation of Visual Studio must have a unique combination of major version, edition, and update channel. For example, you can install Visual Studio 2019 Enterprise Preview (preview channel) alongside Visual Studio 2019 Enterprise (release channel) alongside Visual Studio 2017 Professional (release channel) alongside Visual Studio 2017 Professional (custom layout channel).

When you upgrade from one minor version of Visual Studio to the next, by default, the Visual Studio Installer updates your current installation to the latest version in that channel. For example, if Microsoft releases version 16.11.24 to the Visual Studio 2019 release channel, the installer tries to replace your current installation of Visual Studio 2019 from the release channel with this latest version on the same channel.

Manual installation

You can manually use another bootstrapper to install a new instance of Visual Studio, or you can select one of the options from the Visual Studio Installer's Available tab.

  1. To use another bootstrapper, you can download and run one of the bootstrapper files for Visual Studio 2019 from the Visual Studio 2019 releases page for the edition that you want to install side-by-side with your existing installation of Visual Studio. If you are in an organization, your IT Administrator might create a layout and provided a link to the bootstrapper in that layout.

  2. Using the installer's Available tab presumes that you already have some other version of Visual Studio installed. First find the Visual Studio Installer on your computer and launch it. After it updates itself, select the Available tab and install one of the offered products.

Each installation of Visual Studio must have a unique combination of major version, edition, and update channel. For example, you can install Visual Studio 2022 Enterprise Preview (preview channel) alongside Visual Studio 2022 Enterprise (release channel) alongside Visual Studio 2019 Professional (release channel) alongside Visual Studio 2019 Professional (custom layout channel).

When you upgrade from one minor version of Visual Studio to the next, by default, the Visual Studio Installer updates your current installation to the latest version in that channel. For example, if Microsoft releases version 17.3.9 to the Visual Studio 2022 release channel, the installer tries to replace your current installation of Visual Studio 2022 from the release channel with this latest version on the same channel.

Manual installation

You can manually use another bootstrapper to install a new instance of Visual Studio, or you can select one of the options from the Visual Studio Installer's Available tab.

  1. To use another bootstrapper, you can download and run one of the bootstrapper files for Visual Studio 2022 from either the Visual Studio downloads page or the Visual Studio 2022 releases page for the minor version that you want to install side-by-side with your existing version of Visual Studio.

  2. Using the installer's Available tab presumes that you already have some other version of Visual Studio installed. First find the Visual Studio Installer on your computer and launch it. After it updates itself, select the Available tab and install one of the offered products.

Screenshot showing the Visual Studio Installer's Available tab.

Then follow the steps to select the components you need for your installation. For more information, see Install Visual Studio.

Tip

IT Administrators who want to suppress visibility of the Visual Studio Installer's Available tab or otherwise customize the availability of layout offerings on the Available tab can configure client registry and policies. For more information, see configure policies for enterprise deployments of Visual Studio.

Programmatic installation

You can also programmatically use either a bootstrapper or the installer to start a new installation of Visual Studio. Open a Command Prompt window as administrator and run one of the following commands. Specify a new folder path for the installation location. Replace the .exe file name with the appropriate bootstrapper name for the edition of Visual Studio that you're installing.

To install by using the bootstrapper:

vs_Enterprise.exe --installPath "C:\Program Files (x86)\Microsoft Visual Studio\<AddNewPath>"

To install using the installer that is already present on the client machine:

"C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" --installPath "C:\Program Files (x86)\Microsoft Visual Studio\<AddNewPath>"

You can't initiate the installer programmatically from the same directory that the installer resides in.

.NET Framework versions and side-by-side installations

Visual Basic, Visual C#, and Visual F# projects use the Target Framework option in the Project Designer to specify the version of the .NET Framework that they use. For a C++ project, you can manually change the target framework by modifying the .vcxproj file. For more information, see the Version compatibility in the .NET Framework page.

When you create a project, you can specify which version of the .NET Framework the project targets in the .NET Framework list in the New Project dialog box.

For language-specific information, see the appropriate article in the following table.

Language Article
Visual Basic Application Page, Project Designer (Visual Basic)
Visual C# Application Page, Project Designer (C#)
Visual F# Develop with Visual F# in Visual Studio
C++ How to: Modify the target framework and platform toolset

Support or troubleshooting

Sometimes, things can go wrong. If your Visual Studio installation fails, see Troubleshoot Visual Studio installation and upgrade issues for step-by-step guidance.

Here are a few more support options:

  • We offer an installation chat (English only) support option for installation-related issues.
  • Report product issues to us via 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.
  • Suggest a feature, track product issues, and find answers in the Visual Studio Developer Community.