Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Core SDK versions - which to uninstall?

I have the following versions of .NET Core SDKs installed on my machine:

enter image description here enter image description here

Please confirm that I understand what each of these is (and if I can uninstall them):

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

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

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?

like image 652
Dave New Avatar asked Apr 05 '17 07:04

Dave New


People also ask

Is it safe to uninstall .NET Core SDK?

Unless your application has specific reasons for earlier SDKs or runtimes, you may safely remove older versions.

Can I remove older versions of .NET Core SDK?

NET SDKs and Runtimes. dotnet-core-uninstall remove uninstalls . NET SDKs and Runtimes that are specified by a collection of options. Versions 1.2 and later can uninstall SDKs and runtimes with version 5.0 or earlier, and previous versions of the tool can uninstall 3.1 and earlier.

How do I remove old versions of .NET cores?

To remove the unuseful version of the SDKs and runtimes, you can use the dotnet-core-uninstall tool. Once you've installed it, you can use the following command to see the list with the . NET SDKs and runtimes that can be removed.

Should I remove old versions of .NET Framework?

it's not necessary to remove old version.as jeff said, all the programs use different versions, and old programs will continue using the old version, and new will use new, so it's up to you what to remove or not to remove.


2 Answers

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.

like image 85
Daboul Avatar answered Sep 26 '22 04:09

Daboul


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

like image 39
bereket gebredingle Avatar answered Sep 25 '22 04:09

bereket gebredingle