Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
295 views
in Technique[技术] by (71.8m points)

Is it possible to run .NET Core on Raspberry PI?

I've heard that .NET Core could run on Linux and Mac as well. I am currently using Mono on Raspberry PI. Is it possible or will it be possible to run .NET Core on Raspberry PI?

question from:https://stackoverflow.com/questions/26907857/is-it-possible-to-run-net-core-on-raspberry-pi

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have managed to run .NET Core 2 app on Raspberry PI 3 with Raspbian.

I have followed https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md and https://github.com/dotnet/core/issues/447:

On my laptop:

Install .NET Core 2.0 SDK

Run

mkdir helloworld
cd helloworld
dotnet new console

Edit helloworld.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <RuntimeIdentifiers>win-arm;linux-arm</RuntimeIdentifiers>
  </PropertyGroup>

</Project>

Run

dotnet publish -r linux-arm

On Raspberry PI 3 with Raspbian:

Run sudo apt-get install libc6 libcurl3 libgcc1 libgssapi-krb5-2 libicu52 liblttng-ust0 libssl1.0.0 libstdc++6 libunwind8 libuuid1 zlib1g

Then copy ./bin/Debug/netcoreapp2.0/linux-arm/publish from my laptop

[Modified permissions of helloworld]

Run ./helloworld


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...