Can I run dot NET core on ARM/raspberry pi?

2020-07-13 08:53发布

I can debug and build on my main machine which is x64 but I'd like to execute the code on my pi. After googling there was a comment that said

you will need to build and publish your code on another machine and then copy it to the Pi.

However he seemed to be unsure and it appears I should execute by using dotnet which appears not to be arm so it appears theres no way to run the app

How do I run my app on dot net core on a raspberry pi?

标签: .net-core
2条回答
神经病院院长
2楼-- · 2020-07-13 09:15

Not yet, there are no official sdk builds for ARM. Seems that they are close, but I haven't heard for any schedules. This is the thread I check from time to time to track their progress. https://github.com/dotnet/coreclr/issues/3977

查看更多
男人必须洒脱
3楼-- · 2020-07-13 09:26

Yes! Now with .net core 2.0 and the corresponding sdk you can publish your application for arm architectures: dotnet publish -c Release -r linux-arm. Copy the resulting binaries to you RPi and enjoy.

Be aware of some pre-requisites for linux such as the following packages: curl, libunwind and gettext.

You can check this post for more info: Toggle Raspberry Pi GPIO pins with ASP.NET Core 2.0

查看更多
登录 后发表回答