是否可以在Raspberry PI上运行.NET Core? [英] Is it possible to run .NET Core on Raspberry PI?

查看:118
本文介绍了是否可以在Raspberry PI上运行.NET Core?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说 .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?

推荐答案

我设法运行了.NET Core在带有Raspbian的Raspberry PI 3上的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

在我的笔记本电脑上:

安装。NET Core 2.0 SDK

运行

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

运行 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆