Improve installation instruction on missing runtime

Bug #2046535 reported by Dominik Viererbe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dotnet6 (Ubuntu)
Confirmed
Wishlist
Unassigned
dotnet7 (Ubuntu)
Confirmed
Wishlist
Unassigned
dotnet8 (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

When trying to run a .NET 6 compiled .dll file with only a .NET 8 runtime installed the .NET host recommends to follow the generic install instructions. This should be the case for any missing runtime version, although I haven't tested it for other combinations.

This behavior could be improved by checking if the package manager can find an installable runtime (e.g. with `apt-cache search dotnetX`) and suggest that (`sudo apt install dotnetX`) to the user instead.

Example output
==============

You must install or update .NET to run this application.

App: /home/dviererbe/Repositories/net6/bin/Release/net6.0/publish/net6.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
.NET location: /usr/lib/dotnet/

The following frameworks were found:
  8.0.0 at [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

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=6.0.0&arch=x64&rid=ubuntu.23.10-x64&os=ubuntu.23.10

Changed in dotnet6 (Ubuntu):
importance: Undecided → Wishlist
Changed in dotnet7 (Ubuntu):
importance: Undecided → Wishlist
Changed in dotnet8 (Ubuntu):
importance: Undecided → Wishlist
Changed in dotnet6 (Ubuntu):
status: New → Confirmed
Changed in dotnet7 (Ubuntu):
status: New → Confirmed
Changed in dotnet8 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.