[Mono-bugs] [Bug 79932][Nor] New - Binary Serialization that include Generics does not match MS .Net

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Nov 14 14:39:34 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by itaibh at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79932

--- shadow/79932	2006-11-14 14:39:34.000000000 -0500
+++ shadow/79932.tmp.14213	2006-11-14 14:39:34.000000000 -0500
@@ -0,0 +1,49 @@
+Bug#: 79932
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: itaibh at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Binary Serialization that include Generics does not match MS .Net
+
+I created a simple serializable class that included a string and an integer:
+
+[Serializable]
+puclib class TestData
+{
+  ... // ctor comes here
+  public string someString;
+  public int someInt;
+}
+
+I created a generic list of that class: 
+System.Collections.Generic.List<TestData> someList = new ...
+
+and filled it with some random data:
+
+someList.Add (new TestData ("abc",123));
+...
+
+Then I serialized it to a binary file using a BinaryFormatter.
+The sample included an flag that indicates whether to read the data and
+display it or to write the data to a file.
+
+I compiled the sample on both Visual Studio (MS .Net 2.0) and Mono 1.2
+(gmcs) and compared the output. It was not the same.
+When I tried to read the file written with one compiler with the binary
+compiled with the other compiler it didn't work. The same goes for running
+the same binary with different environments (e.g. Mono vs. MS). Generally,
+I could create 4 different binary serialized files, using the
+compiler/environment combination.
+
+Itai.


More information about the mono-bugs mailing list