Now that we can ssh into Raspberry Pi, let’s get it up and running with .NET Core.
At the time of writing, we downloaded the ARM32 .NET SDK version 5.0.401, however we can download a later/different version by visiting the .NET Download page. We can get more details about the installed Raspberry Pi OS so that we install the correct SDK by using the “cat /etc/os-release” and “uname -m” command.
Download and install the .NET SDK onto the raspberry pi by issuing the following commands:
sudo apt-get install curl libunwind8 gettext wget https://download.visualstudio.microsoft.com/download/pr/ce3cef63-ade6-4209-80f0-ac2815c5b282/e4a8b52aacf74d2a7d6d1cf5b9dca438/dotnet-sdk-5.0.401-linux-arm.tar.gz mkdir -p $HOME/dotnet tar zxf dotnet-sdk-5.0.401-linux-arm.tar.gz -C $HOME/dotnet export DOTNET_ROOT=$HOME/dotnet export PATH=$PATH:$HOME/dotnet
Note that the two “export” command only applies to the current shell session. To make them permanent, we will need to add them to “.bashrc”. Otherwise I think we are ready to go.
Now let’s quickly create a Hello World console app just to make sure the tooling and things are correctly installed.
There we have it. The .NET 5 SDK (and therefore also the .NET 5 runtime) are installed. So whether we want to develop on target or cross compiled, the options are there.