These instructions allow you to install Mono C# 2.10 and MonoDevelop 3.0 on Ubuntu 13.04.
Install the MonoDevelop related tools in your system. At the terminal type:
sudo apt-get install monodevelop mono-utils
Verify that the C# compiler was installed correctly. Type at the terminal:
dmcs --version
You should see the following message:
Mono C# compiler version 2.10.8.1
Now check that the IL assembler is also installed. At the terminal type:
ilasm --version
The output should be:
Mono ILasm compiler version 2.10.8.1
monodevelop
and press Enter at the Unity launcher or terminal.
From the IDE’s menu, select File/New/Solution...
. In the New Solution
dialog window, select C#
and choose the Empty Project
icon. Type your project’s name (for example: hello_world
) in the corresponding text field. You may also specify the project’s location. If you don’t, the project’s directory will be placed under your home folder. Press the Forward
button.
New Solution
dialog window just press the OK
button.
Type Ctrl+N to create and add a new C# source file to your project. In the New File
dialog window, check first the Add to project
box. Afterwards, select the Empty File
icon and type the name for your new file (for example: hello.cs
) in the corresponding text field. Finally press the New
button.
In the hello.cs
editor window, copy the following program and save it using Ctrl+S.
// The "Hello World!" program in C#. using System; namespace HelloWorld { public class Hello { public static void Main () { Console.WriteLine ("Hello World!"); } } }
Type Ctrl+F5 to run the program. You should see the following text in the IDE’s Application Output
pad:
Hello World!