.NET Core SDK versions - which to uninstall?

4 linux fellows

>> dotnet --list-sdks 

2.1.402 [/usr/share/dotnet/sdk]
2.2.105 [/usr/share/dotnet/sdk]
3.0.101 [/usr/share/dotnet/sdk]


>> sudo apt-get purge  dotnet-sdk-3.0    

Hope that helps


The following commands help you understand what is installed on your machine:

dotnet --info
dotnet --list-sdks

Generally, it is not sufficient to just keep the latest SDK available to download. At the time of writing, this would be 3.1 LTS for me, but we have some netcoreapp2.1 applications and a 2.1 SDK is needed to build those. Once you identified all major.minor combinations you need to build for (in my case 3.1 and 2.1) the next step is to identify the latest compatible version for your build environment.

If you use Visual Studio, take a look at the following web site to compare compatible (not latest!) versions: https://dotnet.microsoft.com/download/visual-studio-sdks . This page lists the sdk versions (not runtime versions) that work with Visual Studio. EOL (end of life) tags help you undestand what versions to avoid (uninstall, unless you build those). You will notice that the Visual Studio Installer keeps installing some old versions (eventually becasue I selected some dotnet core workload?) - not sure how to avoid that.

All available runtime versions are listed here: https://dotnet.microsoft.com/download/dotnet-core , but once you select a particular major.minor combo, more details including sdk versions are shown.


First of all, this is the page I find the most useful to understand the complicated versioning of .NET CORE: https://github.com/dotnet/core/blob/master/release-notes/download-archive.md

Then, something that you might already know but that was unclear to me at some point: there is a different versioning between runtimes and SDK and it's sometime complicated to follow. When you install some SDKs it's coming with associated runtimes, for instance .NET CORE SDK 1.0.1 comes with the runtime FTS 1.1.1 and LTS 1.0.4 ... to see that, the creation date of folders installed here can be informative: 'C:\Program Files\dotnet\sdk' for the SDK and 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App' for the runtimes.

So, let me tell you what I think of your statement.

.NET Core SDK 1.0.0 (x64) Installer (x64): This was installed along with VS2017

Agreed. It corresponds to the ".NET Core SDK 1.0.0 and 1.0.1" part of https://github.com/dotnet/core/blob/master/release-notes/1.0/1.0.4.md.

.NET Core SDK 1.0.1 (x64): Downloaded somewhere here and installed manually. Exactly the same as the 1.0.0 SDK above except that it includes support for Fedora 24 and OpenSUSE 42.1. So as a Windows user, can I uninstall this?

Agreed, as stated on the same link as above. My concern is that if you uninstall that you might end up uninstalling the associated runtimes: FTS 1.1.1 and LTS 1.0.4. On my machine, those have been installed at the same date as this SDK and haven't been reinstalled with VS2017 so I'm not sure how the uninstaller would behave.

The other four Microsoft .NET Core 1.x.x SDKs are various versions of the VS2015 (and project.json) preview tooling and can thus be uninstalled?

Visual Studio 2015 is compatible with all SDKs up to preview 2.X based on project.json, preview 3 and upward removed the .json support and moved to .csproj, only compatible with Visual 2017. So if you are only using VS2017 and the latest runtimes 1.0.4/1.1.1 you can safely removed all those. Just make sure that your project is not targeting a particular runtime that you would be removing doing so, see the frameworks of https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json-to-csproj

A generic comment: .NET CORE is supposed to be portable, so its deployement is supposed to be very easy, you don't really have to install it, just copy the proper folder and then set the right env variables and it should be working, it is not deeply modofying your env (no registry entries, no registration of tons of components ...) so you should be able to install / uninstall and test it quite safely. At least, that's my understanding of what MS is trying to do.