I have installed both the runtime and the sdk version 7.0 of dotnet from the https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu website. The runtime -I think- works fine, but the SDK on the other hand, doesn't show up when I run this command:
dotnet --list-sdks
It doesn't show anything, and when I run this command:
dotnet --info
This is shown:
Host:
Version: 7.0.5
Architecture: x64
Commit: (some hex value)
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.16 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.16 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/usr/share/dotnet]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
I even gave sudo privileges, still doesn't show any SDKs.
I am on Ubuntu 22.04
The location of: sdk: /usr/share/dotnet. nside /usr/share/dotnet, three directories:
-sdk
-sdk-manifests
-templates
runtime: /usr/lib/dotnet. Inside /usr/lib/dotnet, three directories and three files:
-host
-packs
-shared
-dotnet -executable-
-LICENSE.txt
-ThirdPartyNotices.txt
Steps I have done: 1.
# Get Ubuntu version
declare repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'; fi)
# Download Microsoft signing key and repository
wget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
# Install Microsoft signing key and repository
sudo dpkg -i packages-microsoft-prod.deb
# Clean up
rm packages-microsoft-prod.deb
# Update packages
sudo apt update
apt install dotnet-sdk-7.0.
I didn't install the runtime 7.0 manually, it was installed automatically with the command:
apt install dotnet-sdk-7.0.
I tried changing both DOTNET_ROOT, and PATH environment variables to the location of sdk: /usr/share/dotnet. Expecting it to recognize the location of the sdk, but it didn't work.
Installed a different sdk version (6.0), still didn't show up.
Reinstalled both the runtime and sdk, still didn't show up.