6

As .NET is OS independent how can I run programs built/compiled on .NET 4.0 ?
Can I develop software in Ubuntu for .NET 4.0 [if yes, what i need to download, link] ?

1
  • 2
    Right now, not every Feature of 3.5 and 4.0 is supported by mono. Hope you don't need WPF or stuff like that.
    – mbx
    Jul 3, 2011 at 9:38

3 Answers 3

9

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

2
  • 2
    It should be noted that .net 4.0 support was added in mono 2.8, and the current ubuntu has 2.6. So there is no .net 4.0 support in any released ubuntu version. mono 2.10 has however made it into ubuntu 11.10 which is not yet released.
    – trampster
    Jul 5, 2011 at 22:38
  • @trampster - many thanks - have updated the answer.
    – fossfreedom
    Jul 5, 2011 at 22:51
3

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.

1
  • what about VB.NET ?
    – Sourav
    Jul 3, 2011 at 6:55
0
  1. I installed using winetricks

    $ sudo apt-get install winetricks
    $ winetricks dotnet40
    
  2. Copy the file they say in dotnet40 to download to the folder they say

    $ cp gacutil-net40.tar.bz2 ~/.cache/winetricks/dotnet40/gacutil-net40.tar.bz2
    
  3. Run winetricks again

    $ winetricks dotnet40
    
  4. Then run your apps with wine

    $ cd .wine/drive_c/Program.../App
    $ wine APP.exe
    

You must log in to answer this question.

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