.NET and Mono

by Manu (modified: 2007 Mar 16)

Until very recently, EiffelStudio generated .NET assemblies would not work with Mono. The culprit was the usage of the #- metadata table format (a non-standardized Microsoft .NET extension which allows specification of the metadata out-of-order) that Mono did not support.

Version 1.2 of Mono supports this format and we decided to look further by checking the compatibility status of our generated .NET assemblies. Unfortunately it does not work yet. A quick interaction with the developers behind mono and we were informed that a next release will fix the issue preventing us to run our assemblies.

So what is the next step? Simply continue the testing of our generated .NET assemblies against Mono. How? Using our compiler regression tool eweasel which is using a script to test generated executables. By default the script simply executes the program and if the execution is successful it will print Execution completed, if not Execution failed. So for running against Mono, we just need to modify this script to run the executables with the mono runtime, i.e. replacing test.exe by mono.exe test.exe.

Once the testing is complete we will have a very good idea of what are the differences between .Net and Mono and in case of divergences how they differ in their interpretation of the CLI standard.

But that's not the end of the story. Currently EiffelStudio is using Microsoft API to read and generate the metadata tables, thus to fully support Mono we need to rewrite those parts to be API independent. After doing this, you can compile CLI assemblies on any platforms (of course to run the assembly you need Windows with .NET or any Unix with Mono).

Unfortunately there is something missing in the picture, it is debugging. How to debug CLI assemblies in a Mono environment? Again we are currently using the Microsoft API for debugging on Windows and it is not clear if Mono offers an equivalent, and if it did, it is most likely very different from the Microsoft API. So until we know more about debugging Mono binaries, you will have to use the mono debugger.

Comments
  • Manu (10 years ago 14/3/2007)

    Miguel de Icaza

    Glad to see that Miguel blogged us, check out his blog.