. NET Core on Raspberry Pi

Source: Internet
Author: User
Tags dotnet

Original Address: Portal

. NET Core on Raspberry Pi

Arm32 builds is available as community supported builds for. NET Core 2.0. There is no SDK this runs on ARM32 if you can publish an application that would run on a Raspberry Pi.

These steps has been tested on a RPI 2 and RPI 3 with Linux and Windows.

Note:pi Zero supported because the. NET Core JIT depends on ARMV7 instructions isn't available on Pi Zero.

Creating an app:
    • Install the. 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 and helloworld go into it.

    • Rundotnet new console

    • You can find a helloworld.csproj file are created under current directory.

<Project Sdk="Microsoft.NET.Sdk">  <PropertyGroup>    <OutputType>Exe</OutputType>    <TargetFramework>netcoreapp2.0</TargetFramework>  </PropertyGroup></Project>
    • If you get a restore of errors, make sure has 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 For example to publish the application for Windows and for dotnet publish -r <runtime identifier> dotnet publish -r win-arm dotnet publish -r linux-arm Linux running on Raspberry Pi.

    • Under or you'll see the whole self contained app, that's ./bin/Debug/netcoreapp2.0/<runtime identifier>/publish need to copy to .\bin\Debug\netcoreapp2.0\<runtime identifier>\publish 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 to see from ./helloworld Hello World! . NET Core running on your pi! (Make sure chmod 755 ./helloworld )

Win10 IoT Core
    • Install Windows IoT Core on your Pi.

    • Copy your app, i.e. whole publish directory mentioned above, to the Raspberry Pi and execute run to see from helloworld.exe Hello World! . NET Core running on your Pi

. NET Core on Raspberry Pi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.