-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Run an Avalonia application on Raspberry Pi
Wiesław Šoltés edited this page Feb 19, 2019
·
4 revisions
These are the steps which worked for me to run an Avalonia
application on Raspberry Pi
.
Flash 8GB SD Card with Raspbian Stretch (2018-11-13). BelenaEtcher
is a nice tool for that.
Plug in the card and start the Raspberry Pi
.
You can follow this guide, next steps are summarized below.
- Install
curl
,libunwind8
,gettext
andapt-transport-https
. Thecurl
andapt-transport-https
often are up-to-date.
sudo apt-get install curl libunwind8 gettext apt-transport-https
- Donwload tar-ball.
curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-arm.tar.gz
- Unpack tarball to
/opt/dotnet
.
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
- Link
dotnet
binary.
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
Alternative: You can login as superuser (run "sudo su")
apt-get -y install curl libunwind8 gettext apt-transport-https
curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-arm.tar.gz
mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
ln -s /opt/dotnet/dotnet /usr/local/bin
Note: Take care of line endings of the script. It should use
LF
instead ofCR LF
. Save the script as.sh
file and run it on theRaspberry Pi
with bashfilename.sh
.
- To run an
Avalonia
application onRaspberry Pi
you need to use this nuGet package:
https://www.nuget.org/packages/Avalonia.Skia.Linux.Natives/1.68.0.2
It includes the libSkiaSharp.so
.
- Now publish the app with the following command:
dotnet publish -r linux-arm -f netcoreapp2.0
- Copy publish directory to the
Raspberry Pi
and run it withdotnet publish/ApplicationName.dll
.