.Net Runtime & SDK missing or not found error in ubuntu vm server for .net core web Api project.

Prem Murmu on 4/10/2025 6:16:45 PM

Error: You must install or update .NET to run this application.
App: /usr/share/dotnet/sdk/8.0.408/dotnet.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.15' (x64)
 .NET location: /usr/share/dotnet/  in ubuntu server
No frameworks were found.

Learn more:

https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:

https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.15&arch=x64&rid=linux-x64&os=ubuntu.22.04


Steps to resolve this issues .NET Runtime & SDK in Ubuntu Servers for Dotnet core as below:-


1. uninstall the .net core sdk & runtime if any in vm

command:

sudo apt remove --purge dotnet-sdk-8.0 dotnet-runtime-8.0 aspnetcore-runtime-8.0 -y


2. Update your package index

     sudo apt update


3. Install required dependencies


sudo apt install -y wget apt-transport-https software-properties-common


4. Add Microsoft package signing key and repository


wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb


5. Update the package index again

 sudo apt update


6. Install the required .NET runtime

  Specifically, you're missing the .NET Core Runtime 8.0.15

    sudo apt install -y dotnet-runtime-8.0


7. Alternatively, if you're running apps that need the full runtime + ASP.NET Core:

  sudo apt install -y aspnetcore-runtime-8.0



8.Verfiy the SDKs & runtimes

dotnet --list-runtimes


check dotnet version in ubuntu bash

dotnet --info



It must be resolved the issue, thanks!!




0 Comments on this post

Comments(0)||Login to Comments


InterServer Web Hosting and VPS
  • see more..