Mono 0.31, libgdiplus 0.2, winelib 1.0

Hello everyone,

A new release of Mono has been released. Mono is an open source implementation of the .NET Framework for Unix, Linux and Windows systems.

The major highligths of this release:

For more detailed and in depth listing of features see the rest of this document.

Since the last release, 2,331 individual commits were done to our runtime and class libraries.


A big thank goes again for Duncan Mak who worked steadily to get every new dependency of Mono compiled and tested on our Linux Platforms. Duncan has a mid-term exam tomorrow, if you are a package user, send him a nice email (


Binary Packages:

Pre-compiled packages for SUSE 9, Red Hat 9 and Fedora Core 1 are available from our web site from the download section.

Source code:

On CVS the tags are: MONO_0_31, MCS_0_31, LIBGDIPLUS_0_2


Ports of popular open source applications are now maintained here:


If you are installing from source code, there are a few optional dependencies that you will want to consider installing.

icu 2.6.1 Required for supporting international information. Strongly recommended.

libgdiplus 0.2 Required if you want to use System.Drawing APIs.

Cairo 0.1.18 Required to install libgdiplus.

Quick source code installation:

If we have no packages for your platform, installing from source code is very simple (MacOS X users, read the rest of the notes):


    $ tar xzf mono-0.31.tar.gz
    $ cd mono-0.31
    $ ./configure
    $ make install

Optional Packages

Libgdiplus and WineLib are optional packages, you only need those if you intent to use System.Drawing and Windows.Forms respectively.


    $ tar xzf libgdiplus-0.2.tar.gz
    $ cd libgdiplus-0.2
    $ ./configure
    $ make install

For WineLib, it is necessary first to install a Wine package from Wine HQ, and once that is installed, you can install the WineLib package, which is now just an extension to Wine instead of a modification to Wine:

    $ tar xzf winelib-0.1.tar.gz
    $ cd winelib-0.1.tar.gz
    $ ./configure
    $ make install

Windows.Forms update

The major achievement in this release is that both System.Drawing and System.Windows.Forms have been improved to the point where it is possible to use Windows.Forms in Mono again. Peter Bartok came up with a wonderful approach to use Wine: now we use a very small program that allows us to use the system Wine. Thanks to Alexandre Julliard for the help in getting this wine "loader" ready.

Windows.Forms applications now work again, but they are not complete. Work is underway to complete them, and now that we have a stable foundation, we would appreciate if volunteers assisted us in completing various controls.

Windows.Forms will not be officially supported for the Mono 1.0 release (but it will be available under the `if it breaks, you get to keep both pieces' agreement). Windows.Forms will be supported in the the Mono 1.2 release.

But those interested in trying it out should: install Wine, winelib-0.1, libgdiplus-0.2 and they can try some of their applications. This is still an early preview, but some applications and tests are up and running again.


Gonzalo did some fixes in the Socket class: It now uses the threadpool for asynchronous IO.

He also improved the threadpool: it now recycles WaitHandles and creates them on demand.

Andreas and Jackson re-implemented the various methods in the `Char' class to use managed code which greatly accelerates all of these routines, by avoiding the managed to unmanaged transition.

PowerPC port

A big change to support thunks was checked by Paolo in to the code generator so we can support large applications (above the 64 MB direct jump limit on PPC).

Exceptions are now partially working on the JIT: if thrown from managed code they work, but still fail when raised from within the runtime engine, and in MacOS X we will need some extra work to catch the equivalent to SIGSEGV, so instead of a NullReferenceException you will get a crash with the JIT today.

MacOS X users: you will need to obtain the latest development of the Boehm GC as the bundled edition of the GC wont work on MacOS X.

To use you must configure with --with-gc=boehm instead of the default which is --with-gc=included.

Debug symbols work on PPC now from Urs.


All of the regression tests that pass on the x86 port of Mono work on the Solaris port. Although it is on par feature-wise with the x86 edition and can complete a complete bootstrap of Mono, it has not yet been tuned for performance like the x86 version has.

The SPARC port of Mono was done by Zoltan Varga in a record time of little more than a month of work.

Interpreter: AMD64 support

Zalman Stern contributed support for running the Mono interpreter on AMD64. It is a port on its early stages.

C# Compiler

Many bugs have been fixed and work on performance has continued in the compiler.

But our major focus has been on adding 2.0 features in a couple of separate branches (anonymous methods and generics).


JScript keeps advancing slowly, Cesar has implemented the If and Print statements as well as the Comma operator.

Mono Runtime Changes.

Sebastien implemented Principal support in AppDomain and Thread class. You can now use imperative Role Based Access Control (RBAC) with Mono.

Many bug fixes continue to be applied to the runtime, many improvements

Async IO support, FileSystemWatcher

Gonzalo added support for Async IO to our IO stack as well as the FileSystemWatcher API.

If your system supports the POSIX aio_ interface, the FileStream will be able to take advantage of it when the programmer requests asynchronous operations. In the past Mono would use threads from the threadpool to implement this functionality.

FileSystemWatcher can take advantage of FAM on sysstems that support it, on other systems the feature is emulated using polling plus a separate thread.


Sebastien has documented his saga in improving the CryptoStream: it took several rewrites until he got all of the samples out there on the network to work, and we are very happy with the results. Someone told me `It is not fun to debug this stream over Http, because all you get is encrypted buffers that are hard to decipher'.

He also implemented key pair persistance for RSA and DSA keys. This is similar to the CryptoAPI containers. Notice that in Linux there is no such things as a "secure storage" like there is in Windows, and the keys are stored in your ~/.mono/keypairs directory.

Updates to Mono.Security.dll:


Sebastien has been working on TLS/SSL support using WebRequest/WebResponse including support for ICertificatePolicy while Carlos has been doing some serious refactoring for future (in-development) server-side TLS/SSL support.

SSL support requires:

Web Services

Improved our `wsdl' command line tool to use the Discovery classes, so it now can handle .disco files as well as .wsdl files. Also Lluis added support for the missing command line options.

System.Web.Services.Discovery is now completely implemented.

The web services stack now routinely processes 300 SOAP WSDL descriptions to ensure that no regressions are introduced into the codebase.

Web Services are the major user of the XmlSerializer, the XmlSerializer historically has used a table to drive the serialization process: the table is computed when you create your serializer, and serialization of objects is done by "interpreting" the table one step at a time.

Lluis has improved the serializer to compile the above serializer table into a C# program. The generated program is then dynamically loaded into the program increasing the performance of serialization. This feature is disabled by default, to enable it you must set the environment variable MONO_XMLSERIALIZER_THS to 0.

A full description on how to control this serializer feature see Lluis description.

Mainsoft has contributed also numerous bug fixes to this release.


The Mainsoft folks (Alon Gazit, Eran Domb and Boris Kirzner) have redone chunks of our ADO.NET implementation to improve its performance in disconnected operation.

Added : indexes on tables are built at the time of constraints and relations adding in order to improve performance of actions that need to query tables for child/parent rows or check row column values uniqueness.

XmlDataReader. Reading DataSet from XML reviewed in order to support various scenarios (missing DataSet element etc).

We have reached completion in a number of classes, thanks to Uma who has been going through the code to complete these: System.Data.SqlTypes, many components of the SQL client types and ODBC.

XML land

Atsushi has been hard at optimizing the XmlReader and XmlWriter as well as the DOM and the Xslt engines.

RelaxNG library: - RelaxngValidatingReader has been improved. It now supports custom datatype. Now it validates XML Schema datatypes and default RELAX NG types by default. Several bugfixes to it have been done.

The library also contains a Compact Syntax parser. You can read a compact syntax file, create a grammar object, and output it in the form of XML via its new writing methods. To use it, you can use:

RncParser parser = new RncParser (new NameTable ()); TextReader source = new StreamReader ("relaxng.rnc"); RelaxngGrammar grammar = parser.Parse (source); return new RelaxngValidatingReader ( new XmlTextReader ("anygrammar.rng"), grammar);

For more details on it, see the The Compact Syntax Parser blog post from Atsushi.

Networking stack

A lot of work went into the HttpWebRequest code, Gonzalo reports:

ASP.NET Web Forms

Gonzalo added support for session and application objects in Global.asax.

Fixed bug in Sys.Web.Configuration that caused a performance loss.


The work continues to split the System.Drawing code into chunks that live in the managed world, and chunks implemented in C for the libgdiplus library which in turn uses Cairo to do all the heavy lifting.

Duncan continuted work on GDI+ and GraphicsPath is now almost complete.

Jordi Mas has completed the Font support (we use FreeType to render the glyphs) and has also been fixing and completing many parts here.

Ravindra Kumar has contributed many of the different brushes: texture, hatch 17 out of 52 styles and early gradient path brush that GDI+ supports.


Lluis improves the binary formatter. It can now generate IL code on the fly to access the fields of objects, giving a x3 performance boost in some cases.

Plenty of bug fixes, some fixes were related to changing some of the field names in our core classes to match the Microsoft .NET names, so we could become compatible with some of the over-the-wire message exchanges.

Npgsql: Postgres bindings.

Implemented support to specify max number of connections Npgsql can use for pooling. The default is 20. You can do that by using the construct MaxPoolSize=value in the connection string.

Also, a timeout construct was added to specify, in seconds, the maximum time Npgsql should wait for getting connections from the pool when there is no connections available. You can use it with Timeout=value in the connection string. Default value is 15.

Encodings used by Npgsql can now be specified in the connection string. Use the construct Encoding=value. Possible values currently supported are: UNICODE and SQL_ASCII. Default value is SQL_ASCII.


certmgr to add/remove/list trusted root certificates (see man page).

setreg to add/remove the (Mono and MS) test root certificates (used by makecert) from trusted certificates.

monop A small little command-line tool from Ben Maurer that dumps a class definition to standard output, useful when programming if you do not remember a method name (a life saver when you do not remember if ArrayList has a Count or a Length ;-)

Generics and the C# compiler

At this point our generics compiler (gmcs) and runtime seem to be feature complete, Martin has been working steadily on the compiler front, and some bits of the Generic class libraries.

Our next tasks are to review the specification and make sure we flag every possible error as well as continuing the implementation of our generic class library.

Although Generics are available now as the gmcs compiler, they will not be part of the 1.0 release, the generic compiler is only present for those working on the post Mono 1.0 components.

Databases: DB2

Victor Vatamanescu has contributed an updated DB2 database provider. It works on both Windows and Linux and matches the API and functionality from the IBM developed provider.

See the for further details.

Consistency and completeness

A special recognition goes to Andreas Nahr who continued his task to complete various low-level bits on the class libraries (adding localization functions, implementing missing interfaces, proper error checking) as well as making our class libraries conform to the coding guidelines.

The people behind this release

The following 66 developers contributed to this release:

Aaron Weber, Adrian Bunk, Albert Strasheim, Albert Strasheim, Alberto Fernández, Aleksey Demakov, Alexandre Pigolkine, Alon Gazit, Andreas Nahr, Atsushi Enomoto, B Anirban, Ben Maurer, Bernie Solomon, Carlos Guzmán Álvarez, Cesar López, Daniel Keep, David Sheldon, Dick Porter, Duncan Mak, Eran Domb, Fawad Halim, Francisco Figueiredo, Francois Beauchemin, Glen Parker, Gonzalo Paniagua, Gustavo Giráldez, Hector Gómez, Inigo Illan, Jackson Harper, Jaroslaw Kowalski, Jear-Marc André, Jeroen Zwartenpoorte, Jochen Wezel, John Luke, Jonathan Pryor, Jordi Mas, Joshua Tauberer, Larry Ewing, Lluis Sánchez, Marco Cravairo, Marek Safar, Mark Crichton, Martin Baulig, Martin Willemoes, Miguel de Icaza, Mike Kestner, Nick Drochak, Paolo Molaro, Pedro Abelleira, Peter Bartok, Rachel Hestilow, Rafael Teixeira, Ravi Pratap, Ravindra Kumar, S Umadevi, Sachin Kumar, Sanjay Gupta, Sebastien Pouliot, Sunil Kumar, Tim Coleman, Todd Berman, Urs Muff, Victor Vatamanescu, Zalman Stern and Zoltan Varga

This list is not complete, it is missing contributions that were sent to the list, as it was very hard to track the one million incremental line patch since the last release.