Compile C# Program on Linux Operating System

Abstract :

probably all programmers working in c# on windows platform but here i m presenting some thing that will give you a brief idea how to compile a c# program on LINUX platform in mono develop IDE.

Compiling Simple Hello world program on LINUX .

I am using Ubuntu release 10.4 to show you the steps .

For running a C# program on Linux machine first of you have to install an IDE in which you can write program and can debug so just install the Mono Develop IDE.
Here are steps to install Mono

Step 1:


Step 2:


Step 3 :

Open Mono develop :


Step 4

Create New Solution By Going to File Menu >> Solution


Just Name the Solution and Press Forward button


Write a Simple Program like below test ..

Compiling Program :

go to Build Menu >> Click Build

to Run the Program go to Run Menu >> Run With >> Mono x.x

you will see the Output at the bottom of the screen .as result but you will notice that its not asking for input as we written some code that taking input from the user thats because its not the original console window so lets make the option so that out program will run in Separate Console Window.

Go to Project Menu >> Project Option >> under Run Section tick Run on External Console.

Now Run the Project Again and viola you have Created your First C# Program on Linux Machine :)

Thank you for reading the Article :)

Similar Articles