dotnet core 3.1.0 not found on Raspberry Pi

Viewed 775

I created a "Hello World" app and now I'm trying to run it on a Raspbarry Pi. When I select "Self-containt" in publish, all files are copied to the Raspberry and I can execut the "Hello World" app. But when I select "Framework-dependant" and publish the app to the Raspberry, I get an error message when I want to run it:

It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
- No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=arm&rid=raspbian.10-arm

But when I check the installed versions:

pi@raspberrypi:~/Desktop/ConsoleAppRaspberryPi1 $ dotnet --list-sdks
3.1.302 [/home/pi/dotnet/sdk]
[1]   Exit 127                - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App
[2]-  Done                    framework_version=3.1.0
[3]+  Done                    arch=arm
pi@raspberrypi:~/Desktop/ConsoleAppRaspberryPi1 $ dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.6 [/home/pi/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.6 [/home/pi/dotnet/shared/Microsoft.NETCore.App]

So I have a 3.1.0 SDK and a 3.1.6 Microsoft.NETCore.App runtime.

In Visual Studio dotnet core 3.1 is selected as target framework.

So why I'm not able to run it on the raspberry. Is a dotnet-core app targeting 3.1 not capable to run un a 3.1.6 runtime?

Can I compile it to run on core 3.1.6? Or should core 3.1 be able to run on runtime 3.1.6? 3.1 is the newest version I can find in Visual Studio installer.

1 Answers

Installing the dotnet runtime to /usr/share/dotnet solved the problem for me. Now it's possible to publish as Framework-dependant.

Related