Bug 44729 - Type.GetType("blah",true,false) throws TypeLoadException without message
Summary: Type.GetType("blah",true,false) throws TypeLoadException without message
Status: VERIFIED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: 4.6.0 (C8)
Hardware: PC Linux
: --- normal
Target Milestone: 4.8.0 (C9)
Assignee: Aleksey Kliger
URL:
Depends on:
Blocks:
 
Reported: 2016-09-26 09:59 UTC by Robert van der Boon
Modified: 2016-10-06 12:19 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: Yes
Last known good build: 4.4.2.11

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

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 4.4.2.11 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 4.6.0.245 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.