0

I currently have installed ASP.NET Core 3.1 on my computer. Now I need to install ASP.NET Core 6.0 to develop a project on ASP.NET Core 6.0 as well on Ubuntu 20.04 LTS Operating System.

When I run the below code

sudo apt-get install -y dotnet-sdk-6.0

It shows the following response

Reading package lists... Done
Building dependency tree       
Reading state information... Done
dotnet-sdk-6.0 is already the newest version (6.0.101-1).
0 upgraded, 0 newly installed, 0 to remove and 153 not upgrade

but when I check available SDK using dotnet --list-sdks

it shows

3.1.416 [/snap/dotnet-sdk/153/sdk]

How can I solve this

  • What exactly is the problem? Why can't you just install it? – Henrique Pombo Dec 21 '21 at 11:49
  • 1
    Yes - just run the install .... – marc_s Dec 21 '21 at 11:51
  • when I run the following code sudo apt-get install -y dotnet-sdk-6.0 it show following response Reading package lists... Done Building dependency tree Reading state information... Done dotnet-sdk-6.0 is already the newest version (6.0.101-1). 0 upgraded, 0 newly installed, 0 to remove and 153 not upgrade but when I checked available SDK using dotnet --list-sdks it show 3.1.416 [/snap/dotnet-sdk/153/sdk] – Abdulgany Mohamed Dec 21 '21 at 18:06
  • It looks like you installed dotnet via `snap` BEFORE you installed it via `apt-get`, my guess is both installations are incompatible with each other. My suggestion would be to avoid using `snap` and install both SDKs via `apt-get`. The path to `snap`'s version of dotnet will be `/snap/...`, while the `apt-get` install will be `/usr/bin/dotnet`, if you do `/usr/bin/dotnet --list-sdks` you should see 6.0 there. Alternatively, install both SDKs via `snap`. – Matthew Dec 21 '21 at 18:13

1 Answers1

0

Microsoft .NetCore 6 SDK

You Need to dowload and install it, also you can do it with Visual Studio, You can Have Both, there is no problem.

Leandro Toloza
  • 1,655
  • 1
  • 6
  • 24
  • when I run sudo apt-get install -y dotnet-sdk-6.0 it show following response Reading package lists... Done Building dependency tree Reading state information... Done dotnet-sdk-6.0 is already the newest version (6.0.101-1). 0 upgraded, 0 newly installed, 0 to remove and 153 not upgrade but when I check available SDK using dotnet --list-sdks it show 3.1.416 [/snap/dotnet-sdk/153/sdk] – Abdulgany Mohamed Dec 21 '21 at 18:04
  • You use snap, before the common instalation, to avoid more problems i recommend u to unistall both sdk and reinstall those again! that should solve your problem – Leandro Toloza Dec 21 '21 at 19:21
  • unistall both sdk and reinstall worked for me – Abdulgany Mohamed Dec 24 '21 at 04:29
  • nice, si if that help to you and you can mark it as an answer apreciate it! have a nice day – Leandro Toloza Dec 24 '21 at 11:38