Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Print the LoaderExceptions property when a ReflectionTypeLoadException occurs #1739

Closed
akoeplinger opened this issue Apr 29, 2015 · 1 comment
Assignees
Milestone

Comments

@akoeplinger
Copy link
Contributor

I ran into the following error today:

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeAssembly.get_DefinedTypes()
   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.TryGetEntryPoint(Assembly assembly, IServiceProvider serviceProvider, Object& instance, MethodInfo& entryPoint)
   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
   at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args)
   at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
   at dnx.host.Bootstrapper.RunAsync(List`1 args)
   at dnx.host.RuntimeBootstrapper.ExecuteAsync(String[] args)
   at dnx.host.RuntimeBootstrapper.Execute(String[] args)

It would be very helpful if the value of LoaderExceptions was printed automatically, cause right now there's no easy way to get it.

@davidfowl
Copy link
Member

/cc @anurse Did you fix this recently?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants