原文地址:传送门

.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 example dotnet publish -r win-arm to publish the application for windows and dotnet 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 see Hello World! from .NET Core running on your Pi! (make sure you chmod 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 run helloworld.exe to see Hello World! from .NET Core running on your Pi

.NET Core on Raspberry Pi的更多相关文章

  1. 在 树莓派(Raspberry PI) 中使用 Docker 运行 aspnetcore/dotnetcore 应用

    本文主要利用 Microsoft 提供的 Dockerfile 进行安装. 虽然Raspberry PI 3 CPU支持 armv8 指令集 ,但是在 docker info 还是识别为 " ...

  2. 2019 年在 Raspberry Pi 「树莓派」上运行的 10 个操作系统推荐

    原文:2019 年在 Raspberry Pi 「树莓派」上运行的 10 个操作系统推荐 image Raspberry Pi** 是一款基于 ARM 的单板计算机,默认运行一款称为 Raspbian ...

  3. 如何在Raspberry Pi 3B中安装Windows 10 IoT Core

    Windows 10 IoT Core简介 Windows 10 IoT是微软专门为物联网生态打造的操作系统,Windows 10 IoT Core则是Windows 10 IoT 操作系统的核心版本 ...

  4. [IOT] - Raspberry Pi 4 Model B 系统初始化,Docker CE + .Net Core 开发环境配置

    本教程为在 Docker 中配置 .Net Core,如果想在树莓派 Raspbian 系统中配置 .Net Core,请参考:[IOT] - 在树莓派的 Raspbian 系统中安装 .Net Co ...

  5. [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 ...

  6. [quote ]ffmpeg, gstreamer, Raspberry Pi, Windows Desktop streaming

    [quote ]ffmpeg, gstreamer, Raspberry Pi, Windows Desktop streaming http://blog.pi3g.com/2013/08/ffmp ...

  7. Azure IoT Edge on Raspberry Pi 3 with Raspbian

    在<Azure IoT Edge on Windows 10 IoT Core>一文中,我们以运行Windows 10 IoT Core的MinnowBoard MAX为例,详细讲述了Wi ...

  8. 如何在Raspberry Pi 3B中安装RASPBIAN

    RASPBIAN简介 RASPBIAN是树莓派官方支持的基于Debian的Linux系统.RASPBIAN预装了很多常用的组件,使用起来十分方便. 官方有RASPBIAN STRETCH WITH D ...

  9. Installing ROS Indigo on the Raspberry Pi

    Installing ROS Indigo on the Raspberry Pi Description: This instruction covers the installation of R ...

随机推荐

  1. web相关基础知识3

    一 .浮动布局   ★元素浮动之后不占据原来的位置,脱离标准流 ★浮动的盒子在一行上显示 ★行内元素浮动之后转换为行内块元素.(不推荐使用,会脱离标准流,转行内元素最好使用display: inlin ...

  2. Flink源码解读之状态管理

    一.从何说起 State要能发挥作用,就需要持久化到可靠存储中,flink中持久化的动作就是checkpointing,那么从TM中执行的Task的基类StreamTask的checkpoint逻辑说 ...

  3. 获取src下的文件

  4. 2018牛客多校第三场 C.Shuffle Cards

    题意: 给出一段序列,每次将从第p个数开始的s个数移到最前面.求最终的序列是什么. 题解: Splay翻转模板题.存下板子. #include <bits/stdc++.h> using ...

  5. gogole调试请求体的数据怎么知道

    在network---->header->request payload中看 详细情况见下图所示:

  6. angular js 模拟获取后台的数据

    在这里我们把后台的数据用一个.json文件进行代替. 项目的目录结构如下: puDongLibraryLearning----ui-router-learning ---- data-------pe ...

  7. 手动安装GCC

    01sunxiaoqiang的博客 Centos离线手动安装gcc.g++教程 转载 2016-11-06 17:35:18 标签:linux应用笔记 在安装LINUX系统的时候很可能会没有安装gcc ...

  8. sql异常-The used SELECT statements have a different number of columns

    两个或多个select查询进行union时,查询的列不对应.两个select进行union时,两个select的查询出的列必须相对应.

  9. LOJ tangjz的背包

    题目大意 有 \(n\) 个物品, 第 \(i\) 个物品的体积为 \(i\) 令 \(f(x)\) 为 选择 \(m\) 个物品, 体积和为 \(x\) 的方案数 令 \(V = \sum_{i=1 ...

  10. django中管理程序1

    为了解决启动关闭程序方便,在django中启动结束任务的问题. urls.py ################DJANGO start kill job####################### ...