[Mono-bugs] [Bug 79434][Wis] New - Order of members does not match MS

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Sep 18 13:03:53 EDT 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 joncham at gmail.com.


--- shadow/79434	2006-09-18 13:03:53.000000000 -0400
+++ shadow/79434.tmp.18842	2006-09-18 13:03:53.000000000 -0400
@@ -0,0 +1,65 @@
+Bug#: 79434
+Product: Mono: Compilers
+Version: 1.0
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: joncham at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Order of members does not match MS
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+The order of members in a class (specifically methods) does not match that
+of MS. Specifically, MS matches the order defined in. Mono always seems to
+put property get/set methods first (with get always before set). Then
+methods. This is problematic for COM/XPCOM interop. The vtable of unmanaged
+COM objects is determined by the corresponding layout of the managed
+interface definition. The MS compilers preserve this information. This
+means mcs/gmcs cannot be used to compile assemblies that will be used for
+COM/XPCOM interop, either on mono or on .Net.
+The sample uses reflection. I know this isn't reliable for method order and
+it's not what is used for the COM Interop infrastructure, but it's good
+enough in this case. The other option is to embed mono and look at the
+unmanaged structures, or use the Marshal.GetComSlotForMethodInfo method
+which does that.
+Steps to reproduce the problem:
+1. Compile attached sample with gmcs.
+2. Compile with csc.
+3. Run both under mono to see that order is different.
+Actual Results:
+$ mono bug_gmcs.exe
+Expected Results:
+$ mono bug_csc.exe
+How often does this happen? 
+Additional Information:

More information about the mono-bugs mailing list