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.
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.
This all worked. However when I went to actually run the dotnet executable. I got the following error.
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:
- Cross-compile coreclr & corefx (possible on Linux x64 machine)
- Extract the dlls without the private and precompiled files to the PI
- Copy your app’s managed dlls to the PI
- Use corerun executable to run your app.
I might try pulling the Core CLR source and compiling it on Raspbian myself.