Difference between revisions of "Mono"

From ArchWiki
Jump to: navigation, search
m (spacing)
(Grammar corrections, better wording, style fixes etc.)
Line 3: Line 3:
 
Mono is an open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET.
 
Mono is an open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET.
  
The Arch Linux packages of mono have activated the experimental .NET 4.0 features, but be aware that it's maybe not stable. Those features are only related for developers, if you just use Mono to run applications written in Mono then you will be not affected by this.  
+
The Arch Linux packages of mono have activated the experimental .NET 4.0 features, but be aware that it may not be stable. Those features are only for developers, so if you just want to use Mono to run applications, then you won't be affected by this.  
 
==Installation==
 
==Installation==
 
First install mono with pacman:
 
First install mono with pacman:
Line 9: Line 9:
 
  # pacman -S mono
 
  # pacman -S mono
  
If you need VisualBasic.Net support you have to install the VisualBasic.Net interpreter with pacman:
+
If you need VisualBasic.Net support you have to install the VisualBasic.Net interpreter:
  
 
  # pacman -S mono-basic
 
  # pacman -S mono-basic
Line 19: Line 19:
 
  mono programsname.exe
 
  mono programsname.exe
  
It is also possible to tell the kernel to use '''mono''' as an interpreter for all Mono binaries. For doing this, just add mono to your daemons array in /etc/rc.conf and it will be automatically setup for you.
+
It is also possible to tell the kernel to use '''mono''' as an interpreter for all Mono binaries. To this, just add mono to your DAEMONS array in /etc/rc.conf and it will automatically be setup for you.
  
 
  DAEMONS=( ..... mono .... )
 
  DAEMONS=( ..... mono .... )
Line 51: Line 51:
 
  # pacman -S monodevelop monodevelop-debugger-gdb monodevelop-debugger-mdb
 
  # pacman -S monodevelop monodevelop-debugger-gdb monodevelop-debugger-mdb
  
If you want the API documentation browser and some testing and development tools you have to install the mono-tools:
+
If you want the API documentation browser and some testing and development tools you have to install mono-tools:
 
   
 
   
 
  # pacman -S mono-tools
 
  # pacman -S mono-tools

Revision as of 21:00, 5 October 2010

Mono is an open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET.

The Arch Linux packages of mono have activated the experimental .NET 4.0 features, but be aware that it may not be stable. Those features are only for developers, so if you just want to use Mono to run applications, then you won't be affected by this.

Installation

First install mono with pacman:

# pacman -S mono

If you need VisualBasic.Net support you have to install the VisualBasic.Net interpreter:

# pacman -S mono-basic

Registering Mono Applications with the Kernel

You can execute binaries by calling mono manually

mono programsname.exe

It is also possible to tell the kernel to use mono as an interpreter for all Mono binaries. To this, just add mono to your DAEMONS array in /etc/rc.conf and it will automatically be setup for you.

DAEMONS=( ..... mono .... )

Now try this:

chmod 755 exefile.exe
./exefile.exe

Testing Mono

Make a new file; test.cs

using System;

public class Test {
 public static void Main(string[] args) {
  Console.WriteLine("Hello World!");
 }
}

Then run:

$ mcs test.cs
$ mono test.exe
Hello world!

Development

Starting to develop in Mono/C# is very easy. Just install the MonoDevelop IDE and debugger support with pacman:

# pacman -S monodevelop monodevelop-debugger-gdb monodevelop-debugger-mdb

If you want the API documentation browser and some testing and development tools you have to install mono-tools:

# pacman -S mono-tools

Resources & Links