我听说.NET Core也可以在 Linux 和 Mac 上运行。我目前在 Raspberry PI 上使用 Mono。是否有可能在 Raspberry PI 上运行 .NET Core?
最佳答案
我已成功使用 Raspbian 在 Raspberry PI 3 上运行 .NET Core 2 应用程序。
我已关注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
[修改helloworld
的权限]
运行./helloworld
关于.net-core - 是否可以在 Raspberry PI 上运行 .NET Core?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26907857/