[Mono-dev] [PATCH] Make DateTime binary compatible with .NET

Ernesto equistango at gmail.com
Fri Nov 6 12:33:36 EST 2009

Jonathan Pobst wrote:
> Jonathan Hseu wrote:
>> And, in the long run, people will stop using older versions of Mono. 
>>  But people will continue to use .NET, and this issue will come up over 
>> and over again.
> The long term fix would probably be add the code that allows the 
> deserializer to *read* either method now to the current branches (2.4 
> LTS, 2.6, and trunk).
> At some point in the future (2.8? 3.0?), we could then change the writer 
> to *write* the .Net way, and it would be backwards compatible with 
> 2.4.3+ as well as compatible with itself and .Net.
> This way you would have to be using very different versions of Mono to 
> hit the incompatibility (2.2 <-> 3.0).
> In the mean time, you can write the .Net way using a environment 
> variable like Gert suggested.  (MONO_STRICT_MS_COMPLIANT)
That sound like the best way to get a smooth transition. As Leszek said, 
it has to be fixed eventually. So it's better to do it sooner than 
later, and it's better to do it transparent than breaking something.

To add, a few bytes from http://www.mono-project.com/FAQ:_Technical

Our policy is to do our best to make the framework classes compatible 
between Mono and MS.NET, however sometimes this is not possible because 
the internal implementation is too different. Notice also that when we 
change a class to make it compatible with MS.NET, we lose compatibility 
with older versions of Mono.

That very same document mentions that serialization "compatibility is 
not even guaranteed between different MS.NET versions or Mono versions".

My 2 cents.


More information about the Mono-devel-list mailing list