Two of the most popular topics on Builder AU, and indeed in the wider industry, is Microsoft's .NET framework and Linux development and administration.
Most of the time the two are in conflict, and it's rare to find a developer who needs to know about both. A lot of people aren't aware that you can combine the two, however, by using the Open Source mono project. This article will get you started on installing mono and running basic .NET applications on Linux
Firstly you'll need to install the base mono package using apt-get. It is a good idea to install two other packages at this point: monodevelop -- an interactive mono development environment similar in some ways to Visual Studio .NET (although nowhere near as sophisticated), and monodoc which provides help and technical documentation.
Just start up a root terminal and type:
% apt-get install mono monodevelop monodoc

When that's finished you've got a mono implementation ready to go, but while you're at it, you may as well include some of the add ons you'll need.
% apt-get install mono-utils mono-xsp monodoc-http
mono-utils provides some command line utilities that are useful if you'll be doing part of your development from the terminal. monodoc-http provides the monodoc manuals as a Web service, which requires the mono-xsp standalone Web server to operate. mono contains mcs the mono C# compiler, but it only compiles .NET 1.1 code, if you want to use the features of .NET 2.0 C# (such as the extremely helpful generics) then you'll need gmcs:
% apt-get install mono-gmcs
If you're planning to use monodevelop to write your code, then you can install a few more packages for SVN, Java, NUnit, Boo and MonoQuery support:
% apt-get install monodevelop-versioncontrol monodevelop-java monodevelop-nunit monodevelop-boo monodevelop-query
Likewise, if you're planning to use monodoc (strongly recommended) you can install manuals for whichever toolkits you'll be using:
% apt-get install monodoc-nunit-manual monodoc-ipod-manual monodoc-gtk2.0-manual

Do you need help with .Net? 




1
Jorn - 30/01/09
I tried this on Ubuntu 8.10, but I get
"Package mono is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package mono has no installation candidate"
What??
» Report offensive content
2
jenis - 19/02/09
Hi,
I wish to install mono. But when i type the command in terminal
desktop:/$ sudo apt-get install mono mono-gmcs mono-gac mono-utils monodevelop
I have the following error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mono is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package mono has no installation candidate
I need your help... plz.... Thankz in advance
» Report offensive content
3
PastorBones - 09/03/09
I'm having the same issues, gonna try building from source
» Report offensive content
4
cs - 29/03/09
Hi
I need to know where I can download a mono c# compiler?
» Report offensive content
5
Christo Fogelberg - 12/04/09
I'm new to this as well, but I believe that the relevant package in Ubuntu is now called mono-mcs, mono-gmcs is the generics compiler.
Frustratingly the binary is called gmcs2, which is breaking configure files that I've downloaded left right and centre... alias gmcs=gmcs2 and search replace in emacs is my friend...
» Report offensive content
6
Jesse - 12/05/09
Jorn, jenis, and PastorBones:
try
the command below instead.
'mono' has been removed from the repository and replaced with monodevelop.
Good Luck
» Report offensive content
7
Jarmo - 28/05/09
I followed instructions of this page to get mono running. Everything went just right to the point where xsp is tested. What followed was:
jay@jay-laptop:~/Projects$ ls
Hello2 HelloWorld index.aspx
jay@jay-laptop:~/Projects$ xsp
Cannot open assembly '/usr/lib/mono/2.0/xsp2.exe': No such file or directory.
I checked that proper directory existed, but xsp2.exe was not there. Obviously something is missing. How wouls I get the missing parts?
» Report offensive content
8
Jarmo - 29/05/09
I solved problem I described above. The instructions provided here do not cover installing xsp2. Search for xsp with synaptic package manager and missing files to install are there. I'm not sure what exactly need to be added as I added a bunch of stuff, but one of the packages to install had xsp2 on name or description, so my guess is that is the one that was needed.
» Report offensive content