[Mono-bugs] [Bug 633473] New: Type.GetType() can't load assemblies containing spaces
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Aug 21 22:32:44 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=633473
https://bugzilla.novell.com/show_bug.cgi?id=633473#c0
Summary: Type.GetType() can't load assemblies containing spaces
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: jpryor at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Apologies if this is a dup, but I didn't see anything relevant.
The program:
using System;
public class Test {
public static void Main ()
{
Console.WriteLine (typeof(Test).AssemblyQualifiedName);
Console.WriteLine (Type.GetType (typeof(Test).AssemblyQualifiedName)
!= null);
}
}
The compilation:
$ gmcs "/out:a b.exe" file.cs
The execution:
$ mono "a b.exe"
Test, a b, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
False
The problem: Type.GetType() returns null (hence the second line of output being
true).
Expected behavior: Type.GetType() returns non-null, and True is printed on the
second line.
NET supports assembly names containing spaces, and will print out True for the
above program.
Further note: .NET also supports *leading* whitespace in the assembly name,
e.g. `gmcs "/out: a b.exe" file.cs` to generate the assembly " a b.exe". When
leading whitespace is present, the AssemblyQualifiedName contains embedded
quotes:
Test, " a b", Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list