Is it expected that cli can be built on ARM?
I was under the impression that I could build this on ARM (as is @shanselman), however I've been unable to make it work. The first step of build.sh seems to be to download a binary rather than build and that seems to be an x86 binary.
I found dotnet/sdk#5310 but it's not clear it that was about binaries or building from source (it sounds like the poster was trying to build, but the subject suggests he wanted binaries).
Is it supposed to be possible to build on ARM, or is this also unsupported?
Steps to reproduce
- Clone repo on Arm machine (eg. Raspberry Pi)
- Execute
build.sh
Expected behavior
Build with no errors.
Actual behavior
Error when executing dotnet restore

Environment data
dotnet --info output:
dotnet does not run
The CLI itself is a portable application, so it will run happily anywhere we find a CLR, CoreFx, and Host [Shared Framework] to match. Whenever we do a new platform bring-up there is a one-time step to bootstrap builds. We've historically done this by getting the Host [corehost] to build, taking a corresponding CLR + CoreFx, and manually building out the first drop of the CLI. Afterwards, the system rolls forward nicely.
We don't have any immediate plans to expand platform coverage. That said, if this is blocking you and you are interested in submitting a PR then I can see if/how soon we could stand up a CI to match.
It's not a big deal, I just thought it'd be fun to get it up and running on my Pi. I'm not sure if I know enough about Linux (total noob!) or dotnet core to do much without hand-holding :(
It would be very nice to be able to build CLI for ARM and Raspberry pi. We have several projects where we are using rc1 on Pi, and it would be excellent to be able to try rc2
@moozzyk was able to build it a while back. I still need to get him his Raspberry Pi back, in fact.
I was actually thinking about trying to enable dotnet on ARM... CoreClr on ARM works and the cli itself does not have a lot awful of native code.
I'm slightly confused from the last two comments about whether this is possible or needs work? :/
@piotrpMSFT said the CLI is a portable app, but @moozzyk said it has some native code.
(it's possible I'm confused between the terms dotnet/cli/coreclr/etc.!)
@DanTup - the lowest layer of the code/bootstrapper is native and CoreClr has also a lot of native code. Currently there is no version of the bootstrapper that is compiled for ARM. The CLI portable applications can be run on different platforms as long as there is a bootstrapper and CoreClr for a given platform.
Sorry, still confused :( What was it that you got working with Scott?
Currently there is no version of the bootstrapper that is compiled for ARM.
Could I just compile the whole thing directly on a Pi or would it likely need debugging/tweaking of native code?
I am also working with my Raspberry Pi's to try to get dotnet working on them. I have RPi 2 and RPi 3. I have been tinkering with both Raspian Jessie and Windows 10 IoT core. I have yet to gain some results, but i'll keep tinkering.
I'm using PI2s with mono rc2 and dnx4.5.1 on raspbian jessie at the moment and it's all great, I'm interested in knowing what my options are going forwards though. I'd like to be able to use the new stuff in future. Stuck with linux as I need hardware accelerated display.
It's out of my comfort zone to try it myself but, if needed, I'd be a willing tester / experimenter for somebody wanting to have a crack.
coreclr has made very good progress on linux arm , thanks to contributions from the community. People from the community are tracking the progress here. https://github.com/dotnet/coreclr/issues/3977
I think manually building coreclr on arm and using that build to built this repo can be made possible. But i think to make cli functional on linux will also need some changes to corefx, mainly publishing linux arm version of native bits published to the nuget feeds.
The actual native code work required was in coreclr which is very near to complete as can be seen from the arm progress issue i linked.
@mylibero had "almost" prepared dotnet-cli/ARM a while ago to the point where we simply need to run Roslyn(csc.exe) in ARM/Linux, which seems to run reliably now (I build my own ARM/Linux c# test cases in ARM machines).
Is the source available for this "stage0" bootstrapper? Obviously there's a bit of inception going on, since the bootstrapper itself is a dotnet CLI, so I'm not sure if it's just a previous build of the full dotnet CLI, or something else but just named the same.
Alternatively, might be able to work some magic with qemu...
I've recently noticed an increasing demand for C# support on Raspbian Jessie. .NET Core would provide a great framework for many kind of networked applications.
I've recently noticed an increasing demand for C# support on Raspbian Jessie
I tried using Mono for now because of lack of support for Core but it was so clunky/buggy and installed so much junk on my Pi I've recently just abandoned the idea of using C# and converted my scripts to Dart. Dart runs on my PC, my x86 Chromebook (in Dev mode, without needing a full linux install) and my Pi; that's what I call cross-platform (.NET Core won't currently run on either the CB or the Pi). :-(
👍 Having .NET Core on Raspbian would be great. Using mono with it's asp.net implementation feels too clunky. Running asp.net core with mono, i'm not even sure if it's possible at the moment (getting the full stack to work: mvc, razor, webapi).
Glad this is starting to get some traction -- my qemu hail mary hit a dead end and now that I have an ARM Chromebook, I need this more than ever!
While officially this is on the roadmap for Q4'16/Q1'17, I'd love to get it working on a dev branch ASAP...If it's simply a matter of priority, I have the cycles to help out however I can -- just point me in the direction of how you'd like it to work and I'll see what I can do about a PR!
Otherwise, my next hail mary is going to be to fork dnx as the stage0...
for stage0 one will need to compile dotnet/coreclr and corefx for pi2 (which is quite stable now) and use that build to run other stages which i suppose includes running nuget for restore , and csc for compiling and may be msbuild too. All of these can be made to run on a coreclr and corefx build as the cli uses nuget to download packages and csc to compile source code.
From @piotrpMSFT
The CLI itself is a portable application, so it will run happily anywhere we find a CLR, CoreFx, and Host [Shared Framework] to match.
I found this after cloning the cli repo to my Android device...which I did after successfully building CoreCLR and CoreFX. I have two questions and one request:
- Am I correct in understanding that dotnet/cli cannot be built on unsupported platforms because corehost needs to be manually built?
- If the answer is "yes", could the build from source instructions...i.e. the prerequisites... be updated to include this? Right now it says that all that's needed to build dotnet/cli is CMake, git and clang.
- If the answer is no...could we get a little more detail into what is necessary to build dotnet/cli from sources? If there are other dotnet components that are prerequisites, please include those.
If I'm not mistaken, corehost is no longer, so how would we do this now? (other than going back to the last commit before corehost was removed, unless that's the only way)