You try to run a dotnet project and you get:
You must install .NET to run this application.
App: /home/phyatt/.dotnet/tools/dotnet-outdated
Architecture: x64
App host version: 8.0.18
.NET location: Not found
Learn more:
https://aka.ms/dotnet/app-launch-failed
Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=linux-x64&os=ubuntu.24.04&apphost_version=8.0.18
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
DOTNET_SDK_VERSION=8.0
sudo ./dotnet-install.sh --channel ${DOTNET_SDK_VERSION} --install-dir /opt/dotnet
dotnet --info
dotnet --list-runtimes
uname -m
file some-dotnet-binary-not-running
Make sure the right environment variables are set, or put a copy of dotnet in the most common location that dotnet checks.
export DOTNET_ROOT=/opt/dotnet
export DOTNET_ROOT_X64=/opt/dotnet
Add these two exports to your session in ~/.bash_profile or ~/.bashrc or similar.