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

查看:39
本文介绍了是否可以在 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?

推荐答案

我已经成功地在带有 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.mdhttps://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

在带有 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屋!

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