.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
helloworld
and go into it.Run
dotnet new console
You can find a
helloworld.csproj
file 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-arm
to publish the application for windows anddotnet publish -r linux-arm
for Linux running on Raspberry Pi.Under
./bin/Debug/netcoreapp2.0/<runtime identifier>/publish
or.\bin\Debug\netcoreapp2.0\<runtime identifier>\publish
you 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
publish
directory mentioned above, to the Raspberry Pi and execute run./helloworld
to 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
publish
directory mentioned above, to the Raspberry Pi and execute runhelloworld.exe
to 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 ...
随机推荐
- codeforce580c (dfs)
题目意思:给你一棵树,然后每个叶子节点会有一家餐馆,你讨厌猫,就不会走有连续超过m个节点有猫的路,然后问你最多去几家饭店 思路:直接DFS Example Input 4 11 1 0 01 21 3 ...
- spring中context:property-placeholder
发现网上对于这个标签的解释过于复杂,这里从实用性角度简短的进行说明. 首先,它是spring3中提供的标签. 只需要在spring的配置文件里添加一句: <context:property-pl ...
- JSP九大内置对象及其方法
内置对象包括 request response pageContext session application out config page exception 1.out (1)clear()清除 ...
- P2127 序列排序
题目描述 小C有一个N个数的整数序列,这个序列的中的数两两不同.小C每次可以交换序列中的任意两个数,代价为这两个数之和.小C希望将整个序列升序排序,问小C需要的最小代价是多少? 输入输出格式 输入格式 ...
- null?对象?异常?到底应该如何返回错误信息
这篇文章记录我的一些思考.在工作了一段时间之后. 问题的核心很简单:到底如何返回错误信息. 学生时代,见到过当时的老师的代码: if (foo() == null) { } 当然,这位老师是一位比较擅 ...
- CSS3边框会动的信封
<!DOCTYPE html><html> <head> <title>酷炫的CSS3</title> <meta charset=& ...
- 如何取消PPT中的动画效果
幻灯片放映——>设置放映式——>勾选放映时不加动画 (office2007)
- mysql__视图
视图 1.什么是视图 视图是一种虚拟存在的表,对于使用视图的用户来说基本上是透明的.视图并不是在数据库中实际存在的,行和列数据来自定义视图的查询中使用的表,并且是在使用视图时动态生成的 视图相对于普通 ...
- xiaoluo同志Linux学习之CentOS6.4
小罗同志写的不错,弄个列表过来啊 Linux学习之CentOS(三十六)--FTP服务原理及vsfptd的安装.配置 xiaoluo501395377 2013-06-09 01:04 阅读:56 ...
- VC遍历窗体控件的实现
最近在写控制台,在设计界面按钮风格时不想通过每个按钮的ID来获取其句柄,而是通过遍历窗体所有控件,然后判断其控件类型进而来实现. 代码如下: // 遍历得到页面中的所有Button控件,依次设定其样式 ...