1

I have written few simple console C# programs in Monodevelop but it seems they run in some emulated enviroment while debugging. The end result is a .exe file which does not runs natively on Ubuntu.

What I need to know is if Mono is same as Visual C# on Windows? Can we create native GUI applications with Monodevelop just as we can with QT Creator(Linux)/Visual Studio(Windows)? If yes, how? If no, why? Why we need Mono on Linux?

4
  • These are not (specifically) Windows applications; C# is a .NET language, and is intended for the creation of cross-platform executables that run on a .NET Common Language Runtime implementation. On Ubuntu that implementation is (usually) Mono. This is, in a certan sense, an emulated environment, but (the vast majority of) C# programs always run this way, even in production. If you don't explicitly want this, you probably want to use a different language. It seems what you're asking about here is fully answered in this question (we could maybe dupe this). Jan 7, 2014 at 22:58
  • 2
    @EliahKagan mm... that question has a different scope of this one. Maybe we need either explain completely how Mono works (I belive your comment do this).
    – Braiam
    Jan 9, 2014 at 1:44
  • 1
    GunJack: Do you feel that what you're asking is not really answered by the information there? If so, then maybe we shouldn't close this (or reopen it if it gets closed). Please let us know! You can do this by commenting or by editing your question. @Braiam Hmm... do we already have a question that explains Mono and how programs that will run on Mono (such as most C# programs, at least most of those developed with MonoDevelop) are different from native Linux executables? I'd be willing to expand my comment into a full answer here but maybe we already have it? Jan 9, 2014 at 5:21
  • 1
    I don't think if the other question is in line with what I seek to know. I have edited my question to make more understandable. Sorry for the bad English, I am not a native speaker.
    – GunJack
    Jan 9, 2014 at 6:40

2 Answers 2

1

C# and all the other languages belonging to the .NET framework are interpreted languages. They are pseudo-compiled, not truly compiled (like C). The bytecode of the .NET framework is called Common Intermediate Language (CIL).

The interpreter (sometimes known as "virtual machine") for the Common Intermediate Language is the .NET Common Language Runtime on Windows and Mono on Linux. Therefore, C# applications won't run "native" (i.e. without an interpreter), not even on Windows.

Probably what surprises you is that Mono is not installed by default on some Linux distributions, while the .NET runtime is.

Anyhow, you can write applications in C# that are nicely integrated with Ubuntu. An example is Tomboy.

There's also an another language, similar to C#, developed by the GNOME project, which is Vala. Vala is translated into C, which is itself compiled, so it will run "native". Because Vala was built by GNOME developers for GNOME developers, it is extremely easy to integrate with the GNOME desktop environment.

4
  • So how do we get that interpreter on Ubuntu/Linux, ie, what is .NET alternative for Ubuntu/Linux?
    – GunJack
    Jan 9, 2014 at 14:23
  • @GunJack: it's Mono. Jan 9, 2014 at 17:07
  • Ok thanks for the clarificaton. Now, Mono is the runtime and MonoDevelop is an IDE like Visual Studio.
    – GunJack
    Jan 10, 2014 at 3:09
  • @GunJack: exactly. Jan 10, 2014 at 12:43
1

To develop for Ubuntu use the QML SDK:

Get the SDK | Ubuntu Developer

1
  • Is this for phone development or for desktop development
    – GunJack
    Jan 9, 2014 at 14:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .