Compiling and running Microsoft .Net Framework apps at Class 1 boards (mono)


If you have skills for developing apps at Microsoft .Net framework, for example C#, you can install the mono project libraries to have compatibility at our Class 1 boards.

With that libraries, you can compile a .cs sourcecode to an .exe application and execute it. All the process can be done at our Class 1 boards.


You will need a Class 1 board with an operating system installed and booted. This was tested at Debian. Yo can follow this steps to generate the boot media for your selected SO. You will need an internet connection attached to your board.

Add the Mono repository to your system

This steps are for Debian for, for other OS, please follow this guide:

Open terminal and insert this for adding the needed repository:

sudo apt-key adv --keyserver hkp:// --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb stable-jessie main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update

Install Mono

Please, insert this command at a terminal for installing the needed software.

sudo apt-get install mono-complete

You will need to wait a couple of minutes.

Compiling a C# program

For testing you can compile a very simple hello world app developed with C#. Please open terminal and insert this command to create a new one empty .cs file

sudo nano hello.cs

Copy and paste this sourcecode to the nano file that you are editing

using System;

public class HelloWorld
   static public void Main ()
       Console.WriteLine ("Hello World");

Press Ctrl+X to close the nano editor and answer "Yes" to save the file.

To compile, use this command:

csc hello.cs

Wait a few seconds until the program is been compiled. When that's done, you will see the command prompt.

You can perform an "ls" command and you will see the hello.exe file appeared at your working directory. That file was created by the compiler from the sourcecode that you have created at the previous steps ("hello.cs" file).


Type the next command for executing your generated .exe application

mono hello.exe

At this point you will see the next text appearing at your command line:

Hello World

The compilation and execution of a .Net framework C# .exe file was succesful!!