Mono enables you to run .Net program on almost every operating systems and my second favorite one is Debian/Linux (my first one is Windows as you can guess).

You need to get some tools:

apt-get install subversion make automake autoconf python gcc g++ libtool pkg-config bison libxml-perl gawk

Get the SVN repository (very slow):

mkdir ~/mono
cd ~/mono
svn co svn://anonsvn.mono-project.com/source/trunk/mcs
svn co svn://anonsvn.mono-project.com/source/trunk/mono
svn co svn://anonsvn.mono-project.com/source/trunk/libgdiplus
#svn co svn://anonsvn.mono-project.com/source/trunk/gtk-sharp

If you don’t have any mono on the system:

cd ~/mono/mono
make get-monolite-latest
make EXTERNAL_MCS=false

You can now compile everything, it takes a lot of time to complete:

cd ~/mono/mono
./autogen.sh
make
make install

If there’s a problem with a missing file error, try to re-launch these three last commands, the “./autogen.sh” should fix it.