I developed a .NET 6.0 app. The computer (raspberry 3) where this service will run has .NET 8.0 runtime.
When I try to run the application with dotnet service.dll, this message appears:
You must install or update .NET to run this application.
App: /home/stationpi/Rpi3Gateway/RpiGateway.dll
Architecture: arm
Framework: 'Microsoft.NETCore.App', version '6.0.0' (arm)
.NET location: /opt/dotnet/The following frameworks were found:
8.0.3 at [/opt/dotnet/shared/Microsoft.NETCore.App]Learn more:
https://aka.ms/dotnet/app-launch-failedTo install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=arm&rid=linux-arm&os=raspbian.11
I can't run services developed in previous version of .NET Core?
Obs: the strangest thing is that when I published the same code for linux-arm64 (raspberry 4), this problem didn't happen
I understood my mistake. In the linux-arm64 publish settings I selected the "Deployment mode" option as "Self-Contained".
When I created another profile, I set this option to "Framework-dependent", which is why when running, it questioned version 6.0.0 of dotnet core.