IDE for making your own .Net Core app. Not required, but recommended if you want to make your own app.

Story

About this project

Microsoft has announced that it's .NET Core is on its way to the Raspberry Pi 3, and an official .NET 2.0 Core, adapted to run on ARM devices, is coming later this year.

Recently .NET Core became available for ARM32 platforms. As it currently stands, it's not an official release, the build of .NET Core offered on GitHub will work with both Ubuntu 16.04, Ubuntu 14.04 and Windows 10 IoT Core with no official support.

Since the Pi day is coming up, let's make an app that will try and calculate the Pi. We will be using Leibniz formula for π to calculate the Pi.

The process

The first thing that we want is to install .NET Core on our main machine. Install .NET Core 2.0 SDK depending on your OS. If you want to make your own app, make sure that you have Visual Studio installed.

Step 1

Once you have installed .NET Core 2.0 SDK (either by extracting binaries or using the installer) on your main machine go to your terminal/commandline, create a folder named picalc and go into it.

mkdir picalc
cd picalc

Step 2

Now we need to create a new app, so to create a template run the following:

dotnet new console -n picalc
cd picalc

Step 3

Since we want out program to compile for ARM32, we need to edit our picalc.csproj
So add the following line bellow <RuntimeFrameworkVersion>:

After we have checked the nuget configuration, it's time to restore all dependencies, so run the following:

dotnet restore

Step 6

Finally we can compile our app into an executable. To that run:

dotnet publish -r <runtime identifier>

where <runtime identifier>
is the platform you want to compile for, in this case win8-arm, ubuntu.14.04-arm or ubuntu.16.04-arm. For example:

dotnet publish -r win8-arm

To publish your app to Windows 10 IoT Core and:

dotnet publish -r ubuntu.16.04-arm

To publish your app to Ubuntu 16.04 on your Raspberry Pi.

Step 7

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 (I recommend using SFTP for transferring files if you are using Ubuntu on your Raspberry Pi). Note: <runtime identifier>
is the platform you published for.