Mono

From ArchWiki
Revision as of 18:28, 13 February 2012 by Thim0aer (Talk | contribs) (Style fixes (Help:Style))

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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

Installation

Mono can be installed with the package mono, available in the Official Repositories.

If you need VisualBasic.Net support you have to install the VisualBasic.Net interpreter with the package mono-basic, available in the Official Repositories.

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