you need to install the obsolete .net 5.0 runtime:
https://dotnet.microsoft.com/en-us/download/dotnet/5.0
or get a .net 7 build of the app.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
root@ubuntu:/etc/systemd/system# /usr/bin/dotnet /var/www/MinAPI/WebApi.dll
You must install or update .NET to run this application.
App: /var/www/MinAPI/WebApi.dll
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '5.0.0' (x64)
.NET location: /usr/lib/dotnet/
The following frameworks were found:
7.0.5 at [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=5.0.0&arch=x64&rid=ubuntu.23.04-x64
you need to install the obsolete .net 5.0 runtime:
https://dotnet.microsoft.com/en-us/download/dotnet/5.0
or get a .net 7 build of the app.
how to install the .NET package on Azure bash?
If you are seeing this error in your Azure DevOps CI pipeline, you need to add the following task to your Yaml file, just before the build step:
- task: UseDotNet@2
displayName: 'Use .NET 5 sdk'
inputs:
packageType: sdk
version: '5.0.x'