Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6489

Why ASP.NET Core runtime doesn't recognize the installed SDKs?

$
0
0

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:  NoneEnvironment variables:  DOTNET_ROOT       [/usr/share/dotnet]global.json file:  Not foundLearn more:  https://aka.ms/dotnet/infoDownload .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 versiondeclare 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 repositorywget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb# Install Microsoft signing key and repositorysudo dpkg -i packages-microsoft-prod.deb# Clean uprm packages-microsoft-prod.deb# Update packagessudo 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.


Viewing all articles
Browse latest Browse all 6489

Trending Articles