skip to Main Content

OS: Ubuntu 20.04 LTS 64 bit
.NET SDK version: 6.0.301
Visual Studio Code version: 1.67.2

I’ve downloaded .NET Core SDK from Plasma Discover and run these commands:
sudo snap alias dotnet-sdk.dotnet dotnet
sudo ln -s /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet

And I Always get this error:
The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path.

I’ve done some reinstalls, none of them worked. How to fix this?

2

Answers


  1. I have used snap to install only preview .NET versions.
    I am not sure whether you have to set your DOTNET_ROOT environment variable.
    I see the recommended way to install .NET6 is to use

    sudo apt-get update; 
      sudo apt-get install -y apt-transport-https && 
      sudo apt-get update && 
      sudo apt-get install -y dotnet-sdk-6.0
    

    You can use dotnet --info to see which versions are installed.
    Once I installed 32-bit version and I received an error that the .NET6 version is not installed. The error was gone after I installed the 64-bit version.

    Reference:
    https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004
    https://learn.microsoft.com/en-us/dotnet/core/install/linux-snap

    Login or Signup to reply.
  2. I could not get the flappack version of Visual Studio on Linux to work – this is the version Ubuntu installs from the software manager. I had all the issues reported by others with VS not being able to find the .NET SDK path etc. I have tried all the fixes and the ideas I could find in forums etc.

    Finally, I installed the .deb direct from Microsoft https://visualstudio.microsoft.com/downloads/ This version worked the first time. The SDKs were picked up straight away and everything worked easily. I was also able to use Python without a series of workarounds for installing packages I had to do.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search