Installing .NET Core on Raspberry Pi 3

I got a new Raspberry Pi 3 last week while I was buying a new Raspberry Pi Zero that I bought for $5. I decided I wanted to try to install .NET Core on my new Raspberry Pi after installing a fresh copy of Raspbian on it.

wp_20170204_10_55_24_pro

The problem is there is no official build of .NET Core for Raspbian. However, since Raspbian was built from Debian I figured I’d give that a shot. So I followed the official instructions from Microsoft to install .NET Core on Debian Linux.

commands.png

This all worked. However when I went to actually run the dotnet executable. I got the following error.

dotnet-not-found

Command not found.

Back to the drawing board I suppose. I found this question on StackOverflow which pretty much summed up what I wanted to do. I found the answer from Adi to be the best. However, he seemed to be promoting his company RavenDB through his answer. It’s true that RavenDB runs on Raspberry Pi but using Ubuntu not Raspbian. However, Adi did impart what I think sounds like a good plan of attack to getting a version that will run on Raspbian:

  1. Cross-compile coreclr & corefx (possible on Linux x64 machine)
  2. Extract the dlls without the private and precompiled files to the PI
  3. Copy your app’s managed dlls to the PI
  4. Use corerun executable to run your app.

I might try pulling the Core CLR source and compiling it on Raspbian myself.

Advertisement

One thought on “Installing .NET Core on Raspberry Pi 3

  1. The Command Not Found error comes from a typo while creating your symlink.

    However, the official MS download is for x86 architecture and the Pi is ARM, so still no dice. ARM is not as well supported yet, but a distro can be found at https://github.com/stevedesmond-ca/dotnet-arm/releases/ (Be sure all prerequisites are installed as well)
    If you’re running stock Rasparian (circa March 2017), you will still not be able to run dotnet as-is because of a missing dependency on GLIBCXX_3.4.21. This can be solved by following these instructions: https://solarianprogrammer.com/2016/06/24/raspberry-pi-raspbian-install-gcc-compile-cpp-14-and-cpp-17-programs/

    That was enough to get it running on my RaspberryPi, YMMV. Good Luck!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s