Bug 44729

Summary: Type.GetType("blah",true,false) throws TypeLoadException without message
Product: [Mono] Runtime Reporter: Robert van der Boon <rjvdboon>
Component: ReflectionAssignee: Aleksey Kliger <aleksey>
Severity: normal CC: masafa, mono-bugs+mono, mono-bugs+runtime, sachins
Priority: ---    
Version: 4.6.0 (C8)   
Target Milestone: 4.8.0 (C9)   
Hardware: PC   
OS: Linux   
Tags: Is this bug a regression?: Yes
Last known good build:

Description Robert van der Boon 2016-09-26 09:59:56 UTC
If I execute the following code:
   Type.GetType("blah", /*throw on error*/true, /*ignoreCase*/false);
I expect a TypeLoadException with a Message starting with:
   "Could not load type 'blah' from assembly '

In mono the Message property is
   "Could not load type 'blah' from assembly ''."

In Microsoft .Net the Message property is
   "Could not load type 'blah' from assembly '{fully qualified name of executing assembly}'."

Since Mono 4.6 the Message property of the exception is empty. (Tested both and master/43ba3b7)

This regression is causing problems in our unit tests.
I've also tried with other arguments (system.string) and the results are the same: mono 4.6+ throws a TypeLoadException with an empty message.