Bug 14899 - System.Reflection.GetTypes caused an exception
Summary: System.Reflection.GetTypes caused an exception
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-09-21 04:29 UTC by Dylan Borg
Modified: 2013-11-23 06:50 UTC (History)
3 users (show)

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

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:
RESOLVED FIXED

Description Dylan Borg 2013-09-21 04:29:47 UTC
While loading a WebApi project under xsp (used to work with Moino 3.2.1) a ReflectionTypeLoadException gets thrown under Mono 3.2.3. The fllowing is the JSON I get when I do a request:
{

    "ExceptionType": "System.Reflection.ReflectionTypeLoadException",
    "Message": "The classes in the module cannot be loaded.",
    "StackTrace": " at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)\n at System.Reflection.Assembly.GetExportedTypes () [0x00000] in <filename unknown>:0 \n at System.Web.Http.Dispatcher.DefaultHttpControllerTypeResolver.GetControllerTypes (IAssembliesResolver assembliesResolver) [0x00000] in <filename unknown>:0 \n at System.Web.Http.WebHost.WebHostHttpControllerTypeResolver.GetControllerTypes (IAssembliesResolver assembliesResolver) [0x00000] in <filename unknown>:0 \n at System.Web.Http.Dispatcher.HttpControllerTypeCache.InitializeCache () [0x00000] in <filename unknown>:0 \n at System.Lazy`1[System.Collections.Generic.Dictionary`2[System.String,System.Linq.ILookup`2[System.String,System.Type]]].InitValue () [0x00000] in <filename unknown>:0 "

}
Comment 1 Zoltan Varga 2013-09-21 07:54:15 UTC
Try running xsp with
MONO_LOG_LEVEL=debug
That might print more information about the problem.
Comment 2 Dylan Borg 2013-11-23 06:50:47 UTC
The problems seems to go away using the latest mono packaging from debian for mono 3.2.3 instead of the one I did.