.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> C# >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Compile and run C# Program on Linux Operating System

Posted By:Kirtan       Posted Date: June 07, 2010    Points: 25    Category: C#    URL: http://www.dotnetspark.com  

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

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 ...to 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 that's 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 voila you have Created your First C# Program on Linux Machine :)



Please download the sample project file below

Thank you for reading the Article :)

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend