C# on Gentoo

.NET developers looking for a similar development framework on gnu/linux operating system should check out the Mono project. its fairly simple to install Mono on most of the gnu/linux environments and start developing applications using the C# language. but beginner programmers would love to have an easy to use IDE which could integrate all the tools required for C# based development in one place. one such tool is MonoDevelop which is fast developing into a useful product. installing it on rpm based distribution was not a satisfactory experience for me however. but i knew it should be easy to install it on Ubuntu and Gentoo operating systems. if you have included Mutliverse and Universe repositories in the apt source list, then MonoDevelop is just one 'apt-get install' away on Ubuntu. it required only a bit more effort on a Gentoo system, so i am documenting it here.

Most of the packages required to get MonoDevelop working on a Gentoo system are in the masked state. put the following lines in the /etc/portage/package.keywords file(create it if it already doesn't exist):

>=dev-dotnet/gtkhtml-sharp-2.4.0 ~x86
>=dev-dotnet/glade-sharp-2.4.0 ~x86
>=dev-dotnet/gconf-sharp-2.4.0 ~x86
>=dev-dotnet/art-sharp-2.4.0 ~x86
>=dev-dotnet/gnome-sharp-2.4.0 ~x86
>=dev-dotnet/vte-sharp-2.4.0 ~x86
>=dev-dotnet/gnomevfs-sharp-2.4.0 ~x86
dev-dotnet/gtksourceview-sharp ~x86
dev-dotnet/gecko-sharp ~x86
dev-dotnet/libgdiplus ~x86
dev-util/monodevelop ~x86
dev-lang/mono ~x86

you can drop ">=" in front of some of the lines above by dropping the version numbers in the same lines.
eg: dev-dotnet/gtkhtml-sharp ~x86
now run 'emerge monodevelop' to get everything installed:
#emerge monodevelop
'emerge mono' will get only the mono environment and all development can be carried out using your favourite editor and command shell.

if you get any problems, first try 'emerge sync' to get everything synchronised, and then rerun 'emerge monodevelop'. if you still get any errors, see if still there are any dependency problems left that are in the masked state. if so, add them too to the '/etc/portage/package.keywords' file and repeat the process.
let me know how this works out for you, as i haven't found much information regarding this on the internet.



  1. plexus said

    Thank you very much for posting this, I used Gentoo for a while on a dual boot (AMD64) before I set up a dedicated system. I didn’t know how to unmask packages back then so I never used Mono on my newer 64 bit. I’d still be running Gentoo on my dedicated system (an old Ultra 10) if it didn’t take so long to compile stuff.


  2. its really painful to wait for the entire compilation to complete before being able to use it. some applications take really long time to get compiled. the advantage is that, this way the package is best optimized for a given architecture, whereas binaries are always available for a generic architecture – like for 386 or 686.
    for really large applications, gentoo development team is now considering providing binaries too. some binaries are already available – like for openoffice.org – which can be installed using -bin option in the emerge command. give it a try and wait for more binaries.

  3. ah aaee said

    To unmask the monodevelop in Gentoo, you can use:
    ACCEPT_KEYWORDS=”~x86″ emerge -pv monodevelop
    This will show you what you’re about to install.
    Once you’re happy with it, do:
    ACCEPT_KEYWORDS=”~x86″ emerge monodevelop
    to kick start the ’emerge’ process!

  4. if you are in a hurry to get started with monodevelop, then `ACCEPT_KEYWORDS=”~x86 emerge monodevelop` is the fastest way. it applies to the masked dependencies also.

    but the next time you try to upgrade your system, your monodevelop can even be *downgraded*, so be sure about what you are doing. the `/etc/portage/package.keywords` way would make the settings persistent – they will be there even when you upgrade in the future.

  5. cpro said

    After continuously running ’emerge monodevelop’ and encountering

    Calculating dependencies
    !!! All ebuilds that could satisfy “dev-util/monodevelop” have been masked.
    !!! One of the following masked packages is required to complete your request:
    – dev-util/monodevelop-0.10 (masked by: ~x86 keyword)
    – dev-util/monodevelop-0.12 (masked by: ~x86 keyword)

    I updated the package.keywords as below to kick off the download.

    my /etc/portage/package.keywords
    dev-util/monodevelop ~x86
    dev-dotnet/gtkhtml-sharp ~x86
    dev-dotnet/glade-sharp ~x86
    dev-dotnet/gconf-sharp ~x86
    dev-dotnet/art-sharp ~x86
    dev-dotnet/gnome-sharp ~x86
    dev-dotnet/vte-sharp ~x86

    >=dev-dotnet/gnomevfs-sharp-2.16.0 ~x86

    dev-dotnet/gtk-sharp ~x86
    dev-dotnet/gtksourceview-sharp ~x86
    dev-dotnet/gecko-sharp ~x86
    dev-dotnet/libgdiplus ~x86
    dev-lang/mono ~x86

    x11-libs/gtk+ ~x86

    dev-libs/glib ~x86

    x11-libs/cairo ~x86

    gnome-base/libgnomeui ~x86

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: