tags:

views:

424

answers:

5

Hi all!

Do you know any ways to run a C# project under Linux. Are there any framewoks or libraries for this?

Regards.

+7  A: 

Checkout the Mono project http://www.mono-project.com/Main_Page

d4nt
+14  A: 

You're looking for the Mono Project - a cross-platform (but primarily targeted at Linux) implementation of the .NET Framework and CLR. It's capable of running binaries compiled for the CLR (MS .NET), or of creating its own native Linux binaries.

The project has been going a while now, and it's current version (2.4) is very usable, even for production purposes. See the project roadmap for details of the main features and milestones of current and future releases.

Details about the current state:

The great majority of the BCL (Base Class Library) is available on Mono, with the exception of some of the .NET 3.0/3.5 stuff, such as WPF (which has minimal support currently) and WCF (almost non-existent support). Silverlight 2.0 is however being supported via the Moonlight project, and progress on that is going well. WinForms functionality (which uses GTK# as a backend) is however quite complete, as far as I know.

Implementation of the C# 3.0 language is effectively complete, including the C# 3.0 features such as lambda expressions, LINQ, and automatic properties. I believe the C# compiler is mature to the point that its efficiency is at least comparable with that of the MS compiler, though not yet matching it in some respects. What's quite cool (and unique) about the Mono C# compiler is that is now offers a compiler service - in other words true dynamic compilation from code (without using the CodeDOM). This is something that MS will perhaps only add in .NET 5.0.

Noldorin
+1 - Do you know of actual production servers running Mono?
Dror
@Dror: Do you mean something like <mono-project.com/Mod_mono>?
Noldorin
@Dror http://www.mono-project.com/Companies_Using_MonoCheck this for examples
prestomation
In some things, Mono is faster than the MS compiler. I've heard that some of the upcoming (if not current) versions will autovectorize code when it can even if the original code doesn't use Mono.Simd.
supercheetah
@supercheetah: I haven't come across one yet myself. :) (Although I'm sure you're right in the odd case.) There have been some real performance improvements in v2.4 apparently, and I'm not sure if I tested with that however.
Noldorin
+2  A: 

Take a look at Mono.

Chris Pebble
+3  A: 

Like others have already said, you can run .NET applications on Mono. If your applications use Platform Invocation (P/Invoke) to call native code, you may run into some trouble if there is no Mono implementation of the native library. To check whether your application does that (or uses APIs that haven't been implemented in Mono yet), you can use the Mono Migration Analyzer (MoMA).

Rytmis
A: 

For Mono, there is an Ide available and it also supports Asp.Net MVC you can check that out here this is the blog of Miguel De Icaza, the project leader for Mono.

Cheers

Miau