Feasibility of C# development with Mono

2019-03-18 12:48发布

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.

7条回答
一纸荒年 Trace。
2楼-- · 2019-03-18 13:15
  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.

查看更多
趁早两清
3楼-- · 2019-03-18 13:33
  1. Mono is mighty powerful. It has all the .Net muscle on a very strong open source skeleton.

  2. When you say "develop GUI application for linux like developing WinForm applications for Windows" I understand that you are asking about a visual designer that will allow you to quickly create the UI. Yes, it is possible. MonoDevelop has Stetic - a built-in visual designer for Gtk#. There is also QyotoDevelop which enables QT support in MonoDevelop.

  3. Yes, MonoDevelop natively supports VS project/solution file format. You can use the same code base to compile your app with VS in .Net on Windows and win MD in Mono on Linux.

  4. Currently Mono supports C# 3.0 with some stuff beyond that already implemented and a lot in the pipeline.

  5. Yes, in many cases it is possible to run a .Net compiled app in Mono, however with MonoDevelop's support for VS solutions it doesn't really matter. It takes as much as pressing F7 to rebuild the whole project, so the effort is really negligible. The best tool for checking if your application can run in Mono is MoMA.

查看更多
beautiful°
4楼-- · 2019-03-18 13:34

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...

查看更多
三岁会撩人
5楼-- · 2019-03-18 13:37
  1. Mono is very powerfull, sometimes even more powerfull than Microsoft's implementation. link text
  2. Yes you can. Winforms 2.0 is supported
  3. I believe so.
  4. Yes it does. C# 3 is supported and just look at winforms and the asp.net implementation to see how much is supported from each of the projects. Look at http://mono-project.com
查看更多
等我变得足够好
6楼-- · 2019-03-18 13:38

I use WinForms in mono. The 2.x releases are very good.

I develop forms in visual-studio on windows, and run them in Linux, with zero code changes. Yes, forms look a little different than on XP, but then again, an XP-themed GUI would look kind of strange in GNOME.

If you are just getting started, stick with WinForms, while you get comfortable with Mono/Linux. However at some point you might want to investigate GTK.

查看更多
ゆ 、 Hurt°
7楼-- · 2019-03-18 13:40
  1. Very powerful. There are no major bugs in the core implementation. It is not a science project. The deficiencies are mostly where you would expect, the newest APIs (Microsoft inherently has a first-mover advantage there).

  2. Yes. We just finished a project where most of the GUI code was developed in WinForms on Windows. I was able to work on it using Ubuntu without major headaches. That said, this is one of the hardest parts of the API, and there are still issues. See http://mono-project.com/WinForms for details.

  3. Don't know, as I don't use it.
  4. Yes, though again, there may be some missing APIs in the runtime.

Note, I use Ubuntu Hardy (8.04).

查看更多
登录 后发表回答