是否可以在 Raspberry PI 上运行 .NET Core? [英] Is it possible to run .NET Core on Raspberry PI?
问题描述
我听说 .NET Core 也可以在 Linux 和 Mac 上运行.我目前在 Raspberry PI 上使用 Mono.是否有可能或是否有可能在 Raspberry PI 上运行 .NET Core?
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?
推荐答案
我已经成功地在带有 Raspbian 的 Raspberry PI 3 上运行 .NET Core 2 应用程序.
I have managed to run .NET Core 2 app on Raspberry PI 3 with Raspbian.
我已关注 https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md 和 https://github.com/dotnet/core/issues/447:
在我的笔记本电脑上:
运行
mkdir helloworld
cd helloworld
dotnet new console
编辑helloworld.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifiers>win-arm;linux-arm</RuntimeIdentifiers>
</PropertyGroup>
</Project>
运行
dotnet publish -r linux-arm
在带有 Raspbian 的 Raspberry PI 3 上:
运行sudo apt-get install libc6 libcurl3 libgcc1 libgssapi-krb5-2 libicu52 liblttng-ust0 libssl1.0.0 libstdc++6 libunwind8 libuuid1 zlib1g
然后从我的笔记本电脑复制./bin/Debug/netcoreapp2.0/linux-arm/publish
Then copy ./bin/Debug/netcoreapp2.0/linux-arm/publish
from my laptop
[修改helloworld
的权限]
运行./helloworld
这篇关于是否可以在 Raspberry PI 上运行 .NET Core?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!