Tuesday, December 29, 2009

C# on Linux

Last Sunday, While i was traveling by a bus to attend the Cochin ILUG meet , i contemplating about Linux development Model. ( I was reading Art of Unix programming while travelling !)
C# is the solution for many ailments (if at all any ) which Linux Platform suffers from.

Linux do not have a good desktop development language + toolchain. You have got on the one end C/C++ which is not good for application development and On the other side you have got Web Programming/Utilities Programming tools like PHP,Python etc..

I thought of experimenting with C#/Mono on Linux as a desktop application programming language. After writing some command line programs of the console genre and Winforms , i think it holds promise. I need to Explore ADO.net as well to Port an accounting/inventory program which i designed ( coded by my wife ) for our family business ( of selling fire crackers ). I might use a OSI license for releasing the software.

On my Fedora 10 installation , Mono was available @ /usr/lib/mono

To compile a program one can use

mcs ( imagine this is test.cs )

if the program compiled correctly , you will get test.exe

you can run the program using
mono test.exe ( there is an option for Ahead of Time Compilation as well )

I tried couple of Console and and a Winforms program.

To compile Winforms application , i used

mcs -r:System.Windows.Forms.dll WinTest.cs

This will produce WinTest.exe , you can run this using

mono WinTest.exe


3 comments:

aashiks said...

emacs has a c# mode , and there is an excellent IDE called Monodevelop. There is also a C# plugin for Eclipse.

aashiks said...

emacs has a c# mode , and there is an excellent IDE called Monodevelop. There is also a C# plugin for Eclipse.

Shalvin said...

Praseed you made a good decision betting on Fedora. I was disappointed to find that Ubuntu and Red Hat distributions doesn't come bundled with Mono.