[Mono-bugs] [Bug 32443][Nor] New - Assembly.LoadFrom ("gizmo.dll").CreateInstance ("gizmo").GetType().FullName allways returns System.Object and not a gizmo.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
17 Oct 2002 12:09:54 -0000


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 gkodinov@openlinksw.co.uk.

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

--- shadow/32443	Thu Oct 17 08:09:54 2002
+++ shadow/32443.tmp.31161	Thu Oct 17 08:09:54 2002
@@ -0,0 +1,50 @@
+Bug#: 32443
+Product: Mono/Runtime
+Version: unspecified
+OS: Red Hat 7.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gkodinov@openlinksw.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Assembly.LoadFrom ("gizmo.dll").CreateInstance ("gizmo").GetType().FullName allways returns System.Object and not a gizmo.
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+Console.WriteLine (Assembly.LoadFrom ("gizmo.dll").CreateInstance 
+("gizmo").GetType().FullName) prints "System.Object" if gizmo doesn't 
+have an no-args constructor, e.g.
+
+class gizmo
+{
+  public gizmo(int a) { ; }
+}
+
+
+Steps to reproduce the problem:
+1. See above
+2. 
+3. 
+
+Actual Results:
+System.Object
+
+Expected Results:
+gizmo
+
+How often does this happen? 
+every time
+
+Additional Information:
+I'm using the CVS versions of mono. The problem is that it calls 
+InternalInvoke and the only info it gets is the method desc, so it uses 
+it to call mono_object_new.