Improving .NET Core installation in Visual Studio and on Windows

Lee Coward

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.

stand_alone_progress

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.

workload_selection

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.

ic_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.

12 comments

Discussion is closed. Login to edit/delete existing comments.

  • Daniel Smith 0

    Why do we have to install the SDK manually these days?  I try to keep up with the ASP.NET Core previews and each release needs the latest preview release of Visual Studio 2019, and the latest version of the SDK.  Why do the preview releases of VS not just install the associated SDK?
    On a side note – for new users, the amount of options on the SDK page must be overwhelming.  It’s on the scale of the Java JDK download pages that also have a confusing amount of options.  For the .NET Core SDK I usually only install the 64-bit version, but it’s not really clear whether it also includes the the 32-bit version, or if both need to be installed.
    If it’s not possible for VS to install the right versions of the SDK – maybe it’s time for an SDK manager feature in Visual Studio, similar to the extentions feature.  The ability to install/update project templates from within VS would also be a nice addition, and would complete the full set of extensibility points – SDKs, Extensions and Templates.

    • Lee CowardMicrosoft employee 0

      Thanks for the feedback, Daniel – valuable and aligns with what we have heard from other folks. Various technologies within VS are installed based on chosen workloads – .NET Core is simply an option in this system. Your observation concerning the download page is spot on and something we’re working to remedy. It will take us a few hops to get there.

  • Marek Chramosil 0

    Please, for the love of god, do NOT do any “full-featured Windows installer”s! .NET core installers are the best that Microsoft has ever came up with, they are simple, fast, and do exactly one thing that is necessary – install/repair by unpack. Your full featured installers for Office, Visual studio, SQL server … are in contrast horrific! Slow, pausing randomly, not finishing… Please do not go this way!

    • Lee CowardMicrosoft employee 0

      Thanks for that, Marek. “Simplicity” and “sufficient (or desired) functionality” sometimes present antagonistic outcomes so, you’re input is timely and well-received!

  • Charles Roddie 0

    Very good! Multiple unnecessary .Net Core installations are the worst thing about .Net Core.
    Now to remove all .Net Framework versions below 4.7.2, or even all .Net Framework versions full stop. These really bloat Visual Studio installations. If software is on lower .Net Framework versions because it hasn’t been updated for more than 1 year, then it doesn’t deserve to be in any Visual Studio workload.

    • Lee CowardMicrosoft employee 0

      Thanks, Charles. I will pass this along to the folks that think about and work on, .NET Framework installations in Visual Studio.

  • Dzmitry Salodki 0

    What with .NET components embeded in Browser? I heard about Blazor… Very interesting about future .net versions like 5,6,7,8. What new planning in its? I had read wiki about future reliases but absolutely do not understand what exactly planning to improve. For example performance…

  • Łukasz Rojek 0

    Hi, it Will be great when I can update my. Net Core from cmd. 

  • Juergen Gutsch 0

    What happenes, if I pinned a project to a previous version using a global.json. A removal of a previous version probably will break the project

  • Olivier LE PICHON 0

    A good option could be to provide a command line argument to either remove previous patch versions (defaut behavior if argument omitted) or keep it untouched.
    Remark: Uninstalling .Net Core SDKs or Runtimes could be easier if it could silently done (without several OK/Next click to do).

  • Jon 0

    I haven’t tried it myself, but my network admin folks tell me they can’t find a way to create a stand-alone network installer for VS 16.3 Preview 1. I really wish you’d just make ISOs available, devs working in locked-down corporate scenarios typically don’t have the option of letting apps randomly install things directly from the Internet.

  • João Paulo Longo 0

    Hey, Lee

    Sorry for the late reply, but can you provide some clarification regarding Visual Studio and .Net Core SDK standalone installer? I’ll start developing .Net Core solutions for my employee and can I just install the base Visual Studio and the standalone .Net Core SDK? I have the SDK installed but Visual Studio doesn’t recognize it without having to install the whole C# workload. I just want to develop for Core and the workload installs a bunch of unnecessary stuff. I also have Ryder and it works just fine, including templates and everything.

Feedback usabilla icon