How do I run .NET programs?

Solution 1:

Overview

Mono provides the core compatibility API for the .Net framework.

The version in Natty (v2.6.7) has support for both Visual Basic & C# version 2,3 & partial API support for v4.

This also includes a VB .Net compiler & the runtime compiler. The other members of the family, j# and f# are not supported in terms of development. Obviously - their compiled variants are byte compatible with the rest of the .Net family.

Windows Forms up-to version 2 is supported - source

The next version of Ubuntu - 11.10 - will come with mono 2.10 which has virtually complete .Net v4 support

Mono Example Usage

An example of a .Net application which I use that runs without issue on Ubuntu is Keepass 2

You run the compiled .exe [it was created under windows] using mono i.e.

mono Keepass.exe

Developing

To develop under Ubuntu, I would have a look at the Mono Develop project - an IDE based environment - search for MonoDevelop in the Software Center.

Installing

Take a closer look at the suggested Add-Ons - choose the Add-Ons in the area that you will be developing in.

enter image description here

Solution 2:

The Mono project offers a compiler and class library for C Sharp compatible with .NET 4.0. The compatibility improves with later versions. Ubuntu contains 2.6.7, I believe, which is the latest long-term stable release. Mono 2.10.2 is the most recent release and has various improvements.

For development, install monodevelop. Ubuntu offers MonoDevelop 2.4. You can grab MonoDevelop 2.6 beta 3 if you're adventurous -- here's a script that installs both Mono 2.10.2 and MonoDevelop 2.6 beta 3.