[Mono-list] Mono 1.0 & Mono 2.0 and compilation

Julien Sobrier julien at sobrier.net
Sun Nov 6 17:42:01 EST 2005


Hello,
I have a couple of questions about the 1.0 and 2.0 profile, and about
what happen at compilation time.

I use Mono 1.1.9.2. Let me know if the following statements are true.

* Mono 1.0 and 2.0
There are 2 different versions of Mono shipped with 1.1.9.2:
   - 1.0 uses /usr/lib/mono/1.0 an gac 1.0.5000.0
   - 2.0 uses /usr/lib/mono/2.0 and gac 2.0.0.0

They also use different compilers:
    - mono/1.0.mcs.exe for 1.0
    - mono/2.0/gmcs.exe for 2.0

Is Mono 2.0/gmcs "complete" I cannot compile my project with gmcs, but
it works with mcs. The error is:
The class System.Reflection.Emit.GeneriTypeParameterBuilder could not be
loaded. Was System.Reflection changed from 1.0 to 2.0?


* Compilation
Let's take the example of the class System.Data. This class is present
in /usr/lib/mono/1.0 and /usr/lib/mono/2.0, and in the GAC with version
1.0.5000.0 and 2.0.0.0.

If I use mcs to compile my source code that uses System.Data, and if if
I explicitly reference the location /usr/lib/mono/2.0/System.Data.dll,
will it use the 2.0.0.0 version from the GAC at runtime? I've been
trying to figure out how to know which version of the libraries are used
at runtime.

What happen exactly at compilation time? Does the compiler only check
that the method(arguments) I used are present in the external library?
Does it make a reference (name, version) to the external library it was
compiled with?


And finally, the reason of all these questions :-)

I use log4net in my project. It was compiled with System.Data 1.0.5000.0
and Mono.Data.SqliteClient 1.0.5000.0. My project also use System.Data
and Mono.Data.SqliteClient. But there was a bug in the 1.0.5000 with the
SqliteParameters that is fixed it 2.0.0.0 (Bug 62613 I believe).

So, I do an explicit reference to /usr/lib/mono/2.0/System.Data.dll and
/usr/lib/mono/2.0/Mono.Data.SqliteClient.dll Then, of course, there's a
version conflict.

I've been told to recompile log4net and my project with gmcs that map
the libraries to the 2.0 version, but I run again the type or error
mentioned earlier.


Well, that a lot of questions! Is there a web page that would give me
more information about Mono 1.0 and 2.0, and how the compilation works
exactly?


Thank you
Julien


More information about the Mono-list mailing list