Mono
The Mono Project and C#
by Matt on Sep.01, 2007, under C#, learning, Mono, programming
So I’ve decided to learn to write C# as I have been repeatedly told that it is a good language (even if it’s designed by MS). So i’ve dug out and installed a copy of MonoDevelop and got started with the Wrox book “Beggining Visual C# 2005″.
I start by writing a simple Hello World application as shown on page 19 of the book, which in Mono looks like the following:
// project created on 9/1/2007 at 8:08 AM
using System;namespace HelloWorld
{
class MainClass
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World! My first C# proggy!!");
Console.ReadKey ();
}
}
}
A quick build attempt and the first problem comes along with an error of
A quick scout around on Google and I find that MonoDevelop assumes you're writing for .net version 1.1 and you have to change this under Project -> Options -> Runtime Options. Then set Runtime Version to 2.0.
After trying to compile it again nothing happens. A read through the build logs shows that I haven't installed gcms (some kind of mono compiler I assume??) one apt-get install mono-gcms later and everything compiles and runs as it should