LMSouq
server-admin Open

dotnet sdk is installed but not recognized - Linux Ubuntu/popOS 22.04

RO
Robinson
1 month ago
3 views
Problem Description
I had the dotnet sdk working just fine yesterday, today when I login to my PC, I update the system and VSCode and then when I tried running ```dotnet watch run```, I got this error: ```The command could not be loaded, possibly because: * You intended to execute a .NET application: The application 'watch' does not exist. * You intended to execute a .NET SDK command: No .NET SDKs were found. Download a .NET SDK: https://aka.ms/dotnet-download Learn about SDK resolution: https://aka.ms/dotnet/sdk-not-found ``` Here is what happens when I try to do an apt install of the sdk(It shows already installed): ``` sudo apt install dotnet-sdk-6.0 [sudo] password for robinson: Reading package lists... Done Building dependency tree... Done Reading state information... Done dotnet-sdk-6.0 is already the newest version (6.0.400-1). 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. ``` Here is my ```dotnet --info```: ``` global.json file: Not found Host: Version: 6.0.8 Architecture: x64 Commit: 55fb7ef977 .NET SDKs installed: No SDKs were found. .NET runtimes installed: Microsoft.AspNetCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.NETCore.App] ``` From my googling, it seems it may be PATH issue, but I tried adding a few different paths and it still didn't work. here is the which dotnet: ```~$ which dotnet /usr/bin/dotnet ``` And my echo path: ```echo $PATH /home/robinson/.nvm/versions/node/v18.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/robinson/.dotnet/tools ``` I'm a linux noob, any help is appreciated. I'm running popOS on an x64 computer.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base