.NET Core on Raspberry Pi
原文地址:传送门
.NET Core on Raspberry Pi
Arm32 builds are available as community supported builds for .NET Core 2.0. There is no SDK that runs on ARM32 but you can publish an application that will run on a Raspberry Pi.
These steps have been tested on a RPi 2 and RPi 3 with Linux and Windows.
Note: Pi Zero is not supported because the .NET Core JIT depends on armv7 instructions not available on Pi Zero.
Creating an app:
Install .NET Core 2.0 SDK into a supported developer configuration. (Raspberry Pi itself is supported only as deployment target.)
From the terminal/commandline create a folder named
helloworldand go into it.Run
dotnet new consoleYou can find a
helloworld.csprojfile is created under current directory.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
</Project>
- If you get restore errors, make sure you have a nuget.config file next to your csproj that includes the dotnet-core myget feed:
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
</packageSources>
</configuration>
Run
dotnet publish -r <runtime identifier>for exampledotnet publish -r win-armto publish the application for windows anddotnet publish -r linux-armfor Linux running on Raspberry Pi.Under
./bin/Debug/netcoreapp2.0/<runtime identifier>/publishor.\bin\Debug\netcoreapp2.0\<runtime identifier>\publishyou will see the whole self contained app that you need to copy to your Raspberry Pi.
Getting the app to run on the Pi.
Linux
Install Linux on your Pi.
Install the platform dependencies from your distro's package manager for .NET Core.
Copy your app, i.e. whole
publishdirectory mentioned above, to the Raspberry Pi and execute run./helloworldto seeHello World!from .NET Core running on your Pi! (make sure youchmod 755 ./helloworld)
Win10 IoT Core
Install Windows 10 IoT Core on your Pi.
Copy your app, i.e. whole
publishdirectory mentioned above, to the Raspberry Pi and execute runhelloworld.exeto seeHello World!from .NET Core running on your Pi
.NET Core on Raspberry Pi的更多相关文章
- 在 树莓派(Raspberry PI) 中使用 Docker 运行 aspnetcore/dotnetcore 应用
本文主要利用 Microsoft 提供的 Dockerfile 进行安装. 虽然Raspberry PI 3 CPU支持 armv8 指令集 ,但是在 docker info 还是识别为 " ...
- 2019 年在 Raspberry Pi 「树莓派」上运行的 10 个操作系统推荐
原文:2019 年在 Raspberry Pi 「树莓派」上运行的 10 个操作系统推荐 image Raspberry Pi** 是一款基于 ARM 的单板计算机,默认运行一款称为 Raspbian ...
- 如何在Raspberry Pi 3B中安装Windows 10 IoT Core
Windows 10 IoT Core简介 Windows 10 IoT是微软专门为物联网生态打造的操作系统,Windows 10 IoT Core则是Windows 10 IoT 操作系统的核心版本 ...
- [IOT] - Raspberry Pi 4 Model B 系统初始化,Docker CE + .Net Core 开发环境配置
本教程为在 Docker 中配置 .Net Core,如果想在树莓派 Raspbian 系统中配置 .Net Core,请参考:[IOT] - 在树莓派的 Raspbian 系统中安装 .Net Co ...
- [IOT] - Raspberry Pi 3B + Windows 10 IOT Core + .Net Core Web 部署
硬件:Raspberry Pi 3B 系统:Windows 10 IOT Core 应用:.Net Core Web 部署流程 1. 系统安装 1.1 下载并安装 Windows 10 IoT Cor ...
- [quote ]ffmpeg, gstreamer, Raspberry Pi, Windows Desktop streaming
[quote ]ffmpeg, gstreamer, Raspberry Pi, Windows Desktop streaming http://blog.pi3g.com/2013/08/ffmp ...
- Azure IoT Edge on Raspberry Pi 3 with Raspbian
在<Azure IoT Edge on Windows 10 IoT Core>一文中,我们以运行Windows 10 IoT Core的MinnowBoard MAX为例,详细讲述了Wi ...
- 如何在Raspberry Pi 3B中安装RASPBIAN
RASPBIAN简介 RASPBIAN是树莓派官方支持的基于Debian的Linux系统.RASPBIAN预装了很多常用的组件,使用起来十分方便. 官方有RASPBIAN STRETCH WITH D ...
- Installing ROS Indigo on the Raspberry Pi
Installing ROS Indigo on the Raspberry Pi Description: This instruction covers the installation of R ...
随机推荐
- 【Linux】——搭建redis
1.准备安装文件 redis-3.0.5.tar.gz redis-desktop-manager(可视化管理工具) 2.解压.编译 软件存放目录:/usr/local/software 解压存放路径 ...
- 【EasyNetQ】- 发送接收
发布/订阅和请求/响应模式是位置透明的,因为您不需要指定消息的使用者所在的位置,而发送/接收模式专门用于通过命名队列进行通信.它也不会假设可以通过队列发送的消息类型.这意味着您可以通过同一队列发送不同 ...
- (转)MongoDB numa系列问题三:overcommit_memory和zone_reclaim_mode
内核参数overcommit_memory : 它是 内存分配策略 可选值:0.1.2.0:表示内核将检查是否有足够的可用内存供应用进程使用:如果有足够的可用内存,内存申请允许:否则,内存申请失败,并 ...
- 关于Assert
如果没有连1394线debug,assert不影响程序的执行,只会在dbgview里面答应"Assertion xxxx"这样的调试信息. 当连着1394线的时候,OS会被hang ...
- js 给某个div增加class 样式(三种方式)
第一种: el.setAttribute('class','abc'); <!DOCTYPE HTML> <HTML> <HEAD> <meta c ...
- capacilitys docker中的权限设置 privileged
capacilities是docker 中对docker权限设置的重要方面: http://blog.csdn.net/wangpengqi/article/details/9821227 上面这篇文 ...
- 高中信息技术《算法与程序设计VB(选修)》知识要点
原博主: http://blog.sina.com.cn/buyanshibai [转载] (一)算法 1.定义 相关题解: 1算法:就是解决问题的方法和步骤.算法是程序设计的“灵魂”,算法+数据结构 ...
- 【题解】ZOJ1420 Cashier Employment
论文——冯威<浅析差分约束系统>. 论文讲得很详细,就不解释了.主要想记录一下对于差分约束的理解(感觉以前的学习真的是在囫囵吞枣啊……) 差分约束系统,同于解决线性的不等关系是否存在合法解 ...
- [51nod1791] 合法括号子段 DP
---题面--- 题解: 首先我们需要发现一个性质,在括号序列不变的情况下,括号匹配是不会变的,因此不论子串怎么取,括号匹配的关系是不会变化的.这是一个很容易发现的性质,然而我太弱,没发现. 于是可以 ...
- 莫比乌斯反演题表II
bzoj3994:[SDOI2015]约数个数和 **很好推+有个小结论bzoj3309:DZY Loves Math ***很好推+线筛某函数/卡常bzoj4816:[Sdoi2017]数字表格 * ...