Description
Installing dotnet-sdk-8.0
to a fresh Ubuntu machine works, upgrading from dotnet-sdk-7.0
results in the built binary outputting:
You must install .NET to run this application.
App: /tmp/console8/bin/Debug/net8.0/console8
Architecture: x64
App host version: 8.0.0
.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.23.10&apphost_version=8.0.0
To Reproduce
run the following script
#!/bin/bash
# Install dotnet-sdk-8.0
apt update && apt install wget -y &&
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) &&
wget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb &&
dpkg -i packages-microsoft-prod.deb &&
apt update &&
apt install dotnet-sdk-8.0 -y &&
# Verify dotnet works
cd /tmp &&
mkdir console8 &&
cd console8 &&
dotnet new console &&
dotnet build &&
./bin/Debug/net8.0/console8 &&
# Install dotnet-sdk-7.0 and upgrade back to dotnet-sdk-8.0
apt remove dotnet-sdk-8.0 -y &&
apt autoremove -y &&
apt install dotnet-sdk-7.0 -y &&
apt remove dotnet-sdk-7.0 -y &&
apt autoremove -y &&
apt install dotnet-sdk-8.0 -y &&
# Binary refuses to run
./bin/Debug/net8.0/console8
This is super easy to reproduce using ubuntu docker images.
docker run -it ubuntu:22.04
I've tested 22.04
and 23.10
, got same results.
Further technical details
-
fresh
dotnet --info
root@b47a0fc499e8:/# dotnet --info
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.6c33ef20Runtime Environment:
OS Name: ubuntu
OS Version: 23.10
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.100/.NET workloads installed:
Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71.NET SDKs installed:
8.0.100 [/usr/share/dotnet/sdk].NET runtimes installed:
Microsoft.AspNetCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]Other architectures found:
NoneEnvironment variables:
Not setglobal.json file:
Not foundLearn more:
https://aka.ms/dotnet/infoDownload .NET:
https://aka.ms/dotnet/download -
borked
dotnet --info
root@b47a0fc499e8:/tmp/console8# dotnet --info
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.6c33ef20Runtime Environment:
OS Name: ubuntu
OS Version: 23.10
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.100/.NET workloads installed:
Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71.NET SDKs installed:
8.0.100 [/usr/share/dotnet/sdk].NET runtimes installed:
Microsoft.AspNetCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]Other architectures found:
NoneEnvironment variables:
Not setglobal.json file:
Not foundLearn more:
https://aka.ms/dotnet/infoDownload .NET:
https://aka.ms/dotnet/download
EDIT:
fixed copy paste error in script