[Mono-bugs] [Bug 69767][Blo] New - Type.GetType should support 'name.space.type, assembly' under some conditions

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 21 Nov 2004 03:46:10 -0500 (EST)


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 josephmolnar@hotmail.com.

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

--- shadow/69767	2004-11-21 03:46:10.000000000 -0500
+++ shadow/69767.tmp.23349	2004-11-21 03:46:10.000000000 -0500
@@ -0,0 +1,74 @@
+Bug#: 69767
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: Widnow
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: josephmolnar@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: Type.GetType should support 'name.space.type, assembly' under some conditions
+
+Description of Problem:
+
+Type.GetType( string ) should allow the loading of a type of the 
+form 'name.space.classname, assemblyname' when the assembly name 
+referenced has already been loaded into the application boundary of the 
+currently running application. The MS CLR (1.1) does support the loading 
+of the type as described above while Mono 1.04 does not.  
+
+There have been bugs filed in the past, including bug 65478, that do not 
+want loading using a string formatted with just the class name and 
+assembly, but the qualifier is that it only should not if the assembly is 
+not already in the application boundary (as far as I can tell). 
+
+The MS CLR and Mono definitely treat the strings generally different.
+
+The simple test case for reproduction:
+
+1. In assembly 'assembly a' define a class 'test.class.a.a'
+2. In assembly 'assembly c', have a using clause for 'test.class.b' and 
+uses type 'test.class.b.b' and then somewhere else call
+Type.GetType( "test.class.a.a, assemble a")
+3. It should be able to load the type properly ... currently it returns 
+null
+
+This is a more thorough way to test the bug:
+
+1. In assembly 'assembly a' define a class 'test.class.a.a'
+2. In assembly 'assembly b' define a class 'test.class.b.b' that 
+uses 'test.class.a'.
+3. In assembly 'assembly c', have a using clause for 'test.class.b' and 
+uses type 'test.class.b.b'.
+4. Then in 'assembly c' have another method that calls 
+Type.GetType( "test.class.a.a, assemble a")
+5. It should be able to load the type properly ... currently it returns 
+null
+
+
+Actual Results:
+
+- Returns null
+
+Expected Results:
+
+- Should return the Type
+
+How often does this happen? 
+
+- Every time.
+
+Additional Information:
+
+Not much new information, but I find this a show blocker for my ability 
+to use Mono for the framework I'm trying to get working on Mono. It is 
+about 32 interfaces and 143 classes, so not easy to get around (other 
+small compatibilities I've found I have some partial work arounds).  This 
+framework is the basis for other work I'm going to try to port just 
+after. I'm hoping to have a single code-base for the MS CLR and Mono.