[Mono-dev] A significant number of Mono classes are not (binary) compatible with their .Net equivalents?
jonpryor at vt.edu
Thu Jan 25 07:15:48 EST 2007
On Thu, 2007-01-25 at 12:22 +0100, Lionel Cuir wrote:
> It seems there are many many classes in Mono that are not fully
> compatible - to be more precise binary compatible - with their
> equivalents in the .Net framework (the fact you work with Mono on
> Linux or Windows does not matter). By binary compatible, I mean to
> binary serialize a class in Mono and to deserialize in .Net, or
> vice-versa. This is a simple but much needed need when two systems
> must communicate with each other (over network or with file exchange).
You're overlooking one "minor" detail: there is no single version of
".NET." There are in fact three versions: 1.0, 1.1, and 2.0 (plus
applicable service packs).
This is actually a major detail, as Microsoft has *never* guaranteed
binary serialization compatibility across different versions of the .NET
framework, and has said in numerous places that binary serialization is
liable to "break" when working between different versions without notice
at any time.
There be dragons here. :-)
To expect Mono to do what Microsoft is unwilling to do is ridiculous.
If you need to ensure binary serialization between Mono and .NET, or
between two different versions of .NET for that matter, you'll need to
do things "manually" -- instead of using container types, store arrays
of types (as arrays iirc are binary compatible everywhere), and
serialize/deserialize to arrays as necessary.
More information about the Mono-devel-list