Improving .NET Core installation in Visual Studio and on Windows

Lee

August 5th, 2019

Visual Studio 2019 version 16.3 and .NET Core 3.0 Preview 7 improve the installation experience of .NET Core on Windows. The goal is to reduce the number of .NET Core versions that might be on a machine. The improvements are based on customer feedback and our own experiences as well as laying the groundwork for future improvements.

.NET Core SDK installer for Windows

Let’s start with the .NET Core SDK installer.

Install now removes previous versions

Starting with .NET Core 3.0 Preview 7, the .NET Core SDK installer will remove previous patch versions after a successful installation. This means that if you have 3.0 Preview 5 and Preview 7 on a machine then install Preview 7, only Preview 7 will remain once the process is complete.

You will see “Processing: Previous version” in the progress dialog during this step.

If you would like to know more, see Overview of how .NET Core is versioned.

The change to remove the previous patch version was made based on customer feedback regarding the many installed versions which could accumulate on a machine.

Installing previous versions of .NET Core

.NET Core still supports side-by-side installations. All previously released versions of .NET Core are available for download at the .NET Core download page. You can find out which .NET Core SDKs and Runtimes are on your machine with dotnet --info .

Visual Studio installation of .NET Core

Visual Studio 2019 16.3 Preview 1 includes the following improvements for .NET Core installation.

We have moved to a model where there will be a single SDK for each Visual Studio installation. There can be multiple versions of the Runtime installed enabling you to target lower versions of the Runtime with the current SDK.

Visual Studio now removes previous .NET Core versions

Visual Studio installs .NET Core. Likewise, if Visual Studio is updated or uninstalled, .NET Core will also be updated or uninstalled.

Additional versions of .NET Core and the .NET Core SDK can be downloaded and installed side-by-side as needed.

Any .NET Core versions installed by the .NET Core installer for Windows will not be affected by the Visual Studio installer. This would happen if, for example, additional versions of .NET Core are installed as described above.

.NET Core in the Programs and Features Control Panel

Visual Studio is now responsible for its copy of .NET Core. There will not be an entry in the Progams and Features Control Panel for the .NET Core version that Visual Studio installs.

The Visual Studio and .NET Core installers will continue to use the same root directory – C:\Program Files\dotnet. It is important that you do not delete the \dotnet directory because Visual Studio depends on .NET Core at that location. If you break your Visual Studio installation by deleting the dotnet directory, run “Repair” in the Visual Studio Installer.

Visual Studio Workloads with .NET Core

The installer Workloads selection has the same experience as previous versions of Visual Studio. When a workload is selected which requires .NET Core, the 3.0 Development Tools (SDK) and 3.0 Runtime will be installed.

Adding .NET Core 2.1 or 2.2

.NET Core 2.1 and 2.2 are optional components in Visual Studio 2019 16.3 and need to be explicitly selected in the Individual Components tab.

If you have already installed the .NET Core 2.1 and/or 2.2 SDK, no additional actions are needed for applications to target these versions. Even though you may have .NET Core 2.1 or 2.2 installed, the Visual Studio Installer Individual Components tab will not have these components selected. If you would like to ensure you have the latest .NET Core 2.1 or 2.2, select them in the Individual Components tab.

In a later preview of Visual Studio 16.3, .NET Core 3.0 and 2.1 (which is the Long Term Support or LTS, release) will be installed whenever a .NET Core workload is selected.

Future enhancements

We are considering additional enhancements to the .NET Core installer. The kinds of functionality we’re exploring for coming releases include providing:

Similar improvements and enhancements for the Visual Studio for Mac installer and the .NET Core installer for Mac.

A full-featured Windows installer to manage .NET Core.

The ability to discover and install updates, similar to update notifications in the Visual Studio Installer.

A removal tool to easily manage the many instances of .NET Core, which may be on a machine.

Leave a comment if there is something else you would like us to consider for the installers.