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