I've heard that .NET Core could run on Linux and Mac as well. I am currently using Mono on Raspberry PI. Is it possible or will it be possible to run .NET Core on Raspberry PI?
Net Core framework the key selling point was it is a cross-platform framework, which mean't that now we can host our . Net application not only on Windows but on Linux too, so let's see how we can deploy .
NET Core is cross-platform. It runs on Windows, OS X and multiple distributions of Linux. It also supports different CPU architectures.
NET Core allows using it also on Mac or Linux on Visual Studio Code. This software also includes IntelliSense and debugging. Building microservices with . NET Core enables you to use different technologies, frameworks, or languages at microservice level.
I have managed to run .NET Core 2 app on Raspberry PI 3 with Raspbian.
I have followed https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md and https://github.com/dotnet/core/issues/447:
On my laptop:
Install .NET Core 2.0 SDK
Run
mkdir helloworld cd helloworld dotnet new console
Edit helloworld.csproj
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp2.0</TargetFramework> <RuntimeIdentifiers>win-arm;linux-arm</RuntimeIdentifiers> </PropertyGroup> </Project>
Run
dotnet publish -r linux-arm
On Raspberry PI 3 with Raspbian:
Run sudo apt-get install libc6 libcurl3 libgcc1 libgssapi-krb5-2 libicu52 liblttng-ust0 libssl1.0.0 libstdc++6 libunwind8 libuuid1 zlib1g
Then copy ./bin/Debug/netcoreapp2.0/linux-arm/publish
from my laptop
[Modified permissions of helloworld
]
Run ./helloworld
Now you can run dotnet core on Raspberry PI. In order to do that you need to:
If you want to skip the above and get a ready made binaries for the Raspberry PI 3 (or even the entire image), you can use my compiled build at:
http://ravendb.net/promo/xmas-win-raspberry-pi
Note: I was able to do that on Raspberry PI 3, using Headless Ubuntu Server 16.04 and with Ubuntu Mate 16.04. I presume additional steps (i.e. installing additional packages) needed to be done on Raspbian OS and PI 2.
Links for Cross Compilation (on Ubuntu 16.04 x64 machine):
A video I made with "how to" get the binaries (which includes our app):
https://www.youtube.com/watch?v=DPxCVDOUlT8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With