After I readed your e-mail I got this in my mind quickly, it's obviously
difficult to serialize generics and I remember now because of some work I
have done on C++ templates serialization.

One thing that is interesting is that MS .NET marks the Dictionary class as
[Serializable] and so it's supposed to work, anyway I got that I should
avoid remoting generic types.

Just for curiosity, if I make a generic class marshalled by reference, do
you know if it will work?

Augusto

On 1/20/07, Robert Jordan <[EMAIL PROTECTED]> wrote:

Augusto Cesar Radtke wrote:
> Hello, I'm facing this error when trying to exchange some structure like
> Dictionary <> between Mono and .NET using Remoting:
>
> Parse Error, no type associated with Xml key a2
> System.Collections.Generic.IEquatableOfTEqualityComparer`1[[
System.String,
> mscorlib, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089]] mscorlib, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b77a5c561934e089
>
> I have already research a lot about it and I think it can be
serialization
> incompatibility between Mono and .NET, I have read that even between
> different .NET Framework versions this could occur, but I'm not totally
> sure.
>
> I'm using the SOAP serialization by setting [Serializable] attribute in
the
> class. Should I implement the ISerializable interface instead of this?
Will
> this fix my problem or there is another way to circumventing this?

SOAP is a dead end for generic types.

MS.NET 2.0 SOAP doesn't support generic types at all, while
Mono's implementation partially supports them by mistake.

The .NET 2.0 remoting and binary serialization support
will be available in the next Mono release.

Robert

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to