124

I'd like to know if there are effective and open source tools to develop C# applications on Linux (Ubuntu). In particular, I have to develop Windows Forms applications.

I know about the Mono project, but I've never used it. What are the best tools (IDE, compiler, etc.) to set up a .NET developing environment on Ubuntu?

Is software developed on Linux runnable on Windows? Are there different behaviors or incompatibilities?

3

7 Answers 7

79

MonoDevelop, the IDE associated with Mono Project should be enough for C# development on Linux. Now I don't know any good profilers and other tools for C# development on Linux. But then again mind you, that C# is a language more native to windows. You are better developing C# apps for windows than for linux.

EDIT: When you download MonoDevelop from the Ubuntu Software Center, it will contain pretty much everything you need to get started right away (Compiler, Runtime Environment, IDE). If you would like more information, see the following links:

5
  • 1
    Is it software developed on linux runnable on windows?
    – davioooh
    Jun 26, 2012 at 8:28
  • 3
    Software developed on windows or linux is runnable on top of .Net framework. So as long as it is possible to install .Net framework in OS it can run the application. You got to aware of the version though ;)
    – Shiham
    Jun 26, 2012 at 8:32
  • @nvrtheless I was wonderng if different framework implementation can create incompatibilites
    – davioooh
    Jun 26, 2012 at 8:34
  • 4
    Backward compatibility is always there as far as I know. Problems may occur if you try to run an application on top of .Net 2.0 which is developed with .Net 3.5 or any later versions.
    – Shiham
    Jun 26, 2012 at 8:39
  • Though you should note, that .Net is always capable of more on Windows. Mono is more of a compatibility project, than an actual software development kit implementation. That's how I see it at least. Jun 26, 2012 at 8:43
28

Now Microsoft is migrating to open-source - see CoreFX (GitHub).

1
21

This is an old question but it has a high view count, so I think some new information should be added: In the mean time a lot has changed, and you can now also use Microsoft's own .NET Core on linux. It's also available in ARM builds, 32 and 64 bit.

1
  • 7
    this should be the top answer, everything else is outdated
    – linluk
    Jan 24, 2022 at 18:50
7

Mono Develop is what you want, if you have used visual studio you should find it simple enough to get started.

If I recall correctly you should be able to install with sudo apt-get install monodevelop

1
  • The installation command is correct however you need to make sure that you have added the monodevelop repository to your system before you do this. Here is a currently working link: monodevelop.com/download And here is the way to add the repository: ``` sudo apt install apt-transport-https dirmngr sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb download.mono-project.com/repo/ubuntu vs-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.list sudo apt update ```
    – Jason R
    Feb 27, 2020 at 5:36
7

I would suggest using MonoDevelop.

It is pretty much explicitly designed for use with Mono, and all set up to develop in C#.

The simplest way to install it on Ubuntu would be to install the monodevelop package in Ubuntu. (link on Mono on ubuntu.com) (However, if you want to install a more recent version, I am not sure which PPA would be appropriate)

However, I would not recommend developing with the WinForms toolkit - I do not expect it to have the same behavior in Windows and Mono (the implementations are pretty different). For an overview of the UI toolkits that work with Mono, you can go to the information page on Mono-project.

5

Mono is a runtime environment that can run .NET applications and that works on both Windows and Linux. It includes a C# compiler.

As an IDE, you could use MonoDevelop, and I suppose there's something available for Eclipse, too.

Note that WinForms support on Mono is there, but somewhat lacking. Generally, Mono developers seem to prefer different GUI toolkits such as Gtk#.

0

You can also install it using conda (tested on Ubuntu):

conda create --name csharp
conda activate csharp
conda install -c conda-forge mono

Not the answer you're looking for? Browse other questions tagged or ask your own question.