.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 ...
随机推荐
- 【PHP】- session_cache_limiter(private,must-revalidate)是什么意思
session_cache_limiter(private,must-revalidate)是什么意思 表义一: 指定会话页面所使用的缓冲控制方法: 当session_cache_limiter('p ...
- 算法(4) Rotate Image
题目:把一个N×N的矩阵旋转90° 思路:这个题目折腾了好长时间,确切地说是两个小时!这道题也反映出自己的逻辑比较混乱 这道题我到底卡在了哪里?自己已经在本子上画出了一个转移的关系 a[0][0] - ...
- LeetCode难度和面试频率(转)
转自:http://www.cnblogs.com/ywl925/p/3507945.html ID Question Diff Freq Data Structure Algorit ...
- StrutsResultSupport的使用
在有特殊情况时:如果没有异常信息,但是有错误并且有错误信息等内容:此时也需要进行友好的错误处理的话,那么可以借助StrutsResultSupport 返回结果类型来实现特定处理.此种方式先需要继承S ...
- [CF1077C]Good Array
题目大意:一个序列是好的当且仅当有一个数是其它所有数的和,问一个序列可以删掉哪个数变成好的序列.输出所有方案. 题解:发现等于其他数的和的那个数一定是其中最大的,只要排序一下(其实只要找到最大的两个数 ...
- 通过init-connect + binlog 实现MySQL审计功能
背景: 假设这么一个情况,你是某公司mysql-DBA,某日突然公司数据库中的所有被人为删了. 尽管有数据备份,但是因服务停止而造成的损失上千万,现在公司需要查出那个做删除操作的人. 但是拥有数据库操 ...
- __cdecl,__stdcall,__fastcall,__pascal,__thiscall 的区别
关于函数的调用规则(调用约定),大多数时候是不需要了解的,但是如果需要跨语言的编程,比如VC写的dll要delphi调用,则需要了解. microsoft的vc默认的是__cdecl方式,而windo ...
- php spl库的使用(PHP标准库)【摘抄引用】
文章来源与推荐阅读:阮一峰--PHP SPL笔记 && PHP SPL使用方法和他的威力 1.SPL 是什么? SPL:standard php library php标准库,此 ...
- MUI 按两次返回键退出应用 及 地理位置获取
<span style="font-size:14px;"><span style="font-size:14px;"> mui.plu ...
- C++中的垃圾回收和内存管理
最开始的时候看到了许式伟的内存管理变革系列,看到性能测试结果的时候,觉得这个实现很不错,没有深入研究其实现.现在想把这个用到自己的一个项目中来,在linux下编译存在一些问题,所以打算深入研究一下. ...