Spatacoli

Category - .NET

  1. Installing .NET Core 3.0 on a Raspberry Pi

    I went into this exercise thinking this would be a tough challenge. However, it turns out to be a very simple process. It’s just prepare, download, unpack, configure, and roll with it.

    Prepare

    First make sure that your Raspberry Pi is running the latest software updates with this command:

    sudo apt-get update && sudo apt-get upgrade

    Once that is done, we need to install libunwind8

    sudo apt-get install libunwind8

    That's it for prepare.

    Download

    Next from the command prompt run this command to get the latest build of .NET Core 3:

    wget https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm.tar.gz

    Unpack

    Create a folder in your home directory called dotnet:

    mkdir $HOME/dotnet

    Then unpack the contents of the .NET SDK into that folder

    tar xzf dotnet-sdk-latest-linux-arm.tar.gz –C $HOME/dotnet

    Configure

    Update the .bashrc file to include these lines:

    export PATH=$PATH:$HOME/dotnet

    export DOTNET_ROOT=$HOME/dotnet

    Restart your console session.

    Roll With It

    First let’s make sure it works with this command:

    dotnet --version

    Now that we have it installed let's try it out. Create a directory called hello-world and change to that directory. Next run the following command:

    dotnet new console

    This will scaffold out a new console application for you. Type:

    dotnet run

    and you’ll see the following!

    RPiDotNet