Install .NET Core SDK on Raspberry Pi

Environment

  • Raspberry pi 3b
  • Raspbian 9.6 stretch

Prepare

Reference

Procedure

Before we install .NET Core on Raspbian, we need to download the .NET Core SDK for ARM32 first. Sadly, we cannot install the SDK in the same way on Debian(use apt for example).

  1. Download .NET Core SDK for ARM32(make sure it’s 32bit) on your raspberry pi.
  2. Use this command to install the SDK.
    mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-2.2.102-linux-arm.tar.gz -C $HOME/dotnet

    You can change the “$HOME/dotnet” path if you want.

  3. (optional)Add these two lines in .bashrc, then you can use “dotnet” command directly.
    # replace $HOME/dotnet path if you changed it
    export PATH=$PATH:$HOME/dotnet
    export DOTNET_ROOT=$HOME/dotnet
  4. Make the changes take effect immediately.
    source ~/.bashrc

Now we can use “dotnet new” to generate new project and start developing on raspberry pi.

The building process is less efficient, the simplest mvc template project takes about 2-3 mins to build.

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据