TN.*_*TN. 40 raspberry-pi .net-core
我听说.NET Core也可以在Linux和Mac上运行.我目前在Raspberry PI上使用Mono.是否可以或者可以在Raspberry PI上运行.NET Core?
TN.*_*TN. 15
我已经设法使用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
Run Code Online (Sandbox Code Playgroud)
编辑 helloworld.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifiers>win-arm;linux-arm</RuntimeIdentifiers>
</PropertyGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)
跑
dotnet publish -r linux-arm
Run Code Online (Sandbox Code Playgroud)
在Raspberry PI 3上使用Raspbian:
跑 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
现在,您可以在Raspberry PI上运行dotnet核心.为此,您需要:
如果你想跳过上面的内容并获得Raspberry PI 3(甚至是整个图像)的现成二进制文件,你可以使用我编译的版本:
http://ravendb.net/promo/xmas-win-raspberry-pi
注意:我能够在Raspberry PI 3上使用Headless Ubuntu Server 16.04和Ubuntu Mate 16.04.我假设需要在Raspbian OS和PI 2上完成额外的步骤(即安装额外的软件包).
交叉编译的链接(在Ubuntu 16.04 x64机器上):
我用"如何"获取二进制文件(包括我们的应用程序)制作的视频:
https://www.youtube.com/watch?v=DPxCVDOUlT8
小智 6
我会发表评论,但因为我不能发布作为答案,我认为应该更新已接受的答案.因为现在可以检查coreclr https://github.com/dotnet/coreclr/pull/1210
这完全是社区的努力,虽然这仍然非常粗糙(异常处理和调试尚未得到支持),所以你不能把它作为一个解决方案,但最终它会到达那里.日期:2015年7月26日
| 归档时间: |
|
| 查看次数: |
15291 次 |
| 最近记录: |