Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Feasibility of C# development with Mono

Recently, I came across Mono and MonoDevelop packages in Ubuntu linux. They claim to have a .NET runtime in accordance with CLI. Before installing the packages myself, I would like to know the following:

  1. How powerful is Mono?

  2. Can I develop GUI application for linux like developing WinForm applications for Windows.

  3. Is MonoDevelop IDE compatible with Visual Studio IDE. Can I import VS 2008 solutions to MonoDevelop and work?

  4. Does it support .NET 2.0 and above?

EDIT: Adding one more doubt

Is there any way to run the .NET exe (of a winform app) in Linux without building the cod e in linux? In fact I don't have the code for some of the small utilities I developed earlier and would like to run them in linux.

like image 831
softwarematter Avatar asked Apr 28 '09 09:04

softwarematter


3 Answers

  1. (Strange, markdown starts the enumeration with one, even though I began with 2...)

  2. Yes, you can, but you're limited with 3rd-party components, because the internal implementation is different, and last time I checked (not very long ago), the Mono WinForms implementation made my test app look rather strange (owner-drawn list view). It is not really recommended, though Mono claims that it's now completely WinForms-2.0-compatible.

  3. MonoDevelop is/was a SharpDevelop branch, with the latter having solution support. I don't know if MonoDevelop has. But the cool thing is, you can just develop with Visual Studio and run your compiled apps on Mono. And Mono is, by the way, also available for Windows.

  4. Yes, it does, as far as the CLR goes. As Marc Gravell already wrote, the Windows Foundation libraries are missing, as are a few other (System.Management, for example). But things should mostly work, including ASP.NET 2.0. Mono's application portability guidelines are a good read on this.

like image 198
OregonGhost Avatar answered Nov 04 '22 17:11

OregonGhost


1: pretty good, actually. Not all the full framework is there, so if you are writing code that should build on both MS .NET and mono, you need to build and test early against both platforms

4: yes - although things like WPF/WCF/WF (3.0) are missing or slimmed down

I don't know much about the development environment, since I use VSTS (on Windows) and just use a NANT script to do the build on mono...

like image 22
Marc Gravell Avatar answered Nov 04 '22 18:11

Marc Gravell


  1. Define "powerful".
  2. Mono has a WinForms implementation to allow for some level of source compatibility. However, depending on your needs, you might want to use one of the Mono bindings for a Linux native framework, like Gtk# or Qyoto
  3. Wouldn't know.
  4. Depends on what parts of .NET you mean. C# the language seems to be pretty current, things get fuzzier the closer you get to the enterprisey features as was already mentioned.

To sum things up, if you'll be using Mono as a separate target platform, you're likely to have good results. If you want a no-code-changes-required .NET compatibility layer, less so.

like image 2
millimoose Avatar answered Nov 04 '22 16:11

millimoose