*** Draft ***
The goal is to have all development work done on Raspberry Pi. We will not be moving back and forth from Windows to Raspberry Pi.
And, we will be using monodevelop as IDE to code, debug, and test C# programs. Much like Visual Studio, the development work will be performed on full screen GUI mode.
Now, open Terminal session and enter the following commands to install mono and monodevelop.
sudo apt install mono-complete sudo apt install monodevelop
Create Project Folder
The default folder for mono solutions is
/home/user-name/Projects. For Raspbian, the default
pi. For Ubuntu Mate, the
user-name is the one that you created during initial configuration.
Either you are going to use the default folder, or you prefer to have a different folder, you should ensure the folder already existed.
You can create folder with File Manager.
Create the folder you need for your mono solutions. Assuming you are using the default folder, here is the screen after the folder is created.
Default Projects Location
From the menu, open MonoDevelop:
The first thing to do is to make sure the default folder for mono Solutions is correct.
From MonoDevelop menu, open Edit | Preferences. Navigate to Projects | Load/Save. Change the Default Solution location to the folder where you want to put your mono Solutions.
Now, we are ready to create the Hello World program. With MonoDevelop opened, click on
For Hello World, let’s create a Console Project.
Enter Project Name and Solution Name.
For the Location, it is best to leave it as the default as defined in the previous section. If you use a folder other than default, or if the folder specified in Location does not exist, you may encountered problems. The problem that I had before, was that MonoDevelop just closed without any message. Hopefully, same problem will not happen to you.
Click on Create button, MonoDevelop will create the skeleton program for you. And it is literally a Hello World program.
Expand the HelloWorld project on the left side of the screen. The structure is similar to projects in Visual Studdio.
Double click on Program.cs to see the program source code on the right side of the screen. It looks like this:
To run the program in debug mode, click the Run icon on upper left corner of the screen.
Click on Run menu to see other alternatives to run the program.
Hello World! message will be displayed on the Console. Just press any key to end debugging.
Well, it worked as expected on Unbuntu Mate. (The following screen is from Ubuntu Mate.)
Finally, we are done with the Hello World program. From this point on, you can either
- Learn more about plug-in and supporting packages for MonoDevelop. If you have large projects in mind, these packages should be helpful.
- Or, you can jump into database introduction. If you need to have database I/O in your program.
- Otherwise, jump to Interface with Hardware Components. This is probably the most fascinating feature when working on single board computer. Go ahead and have some fun.