From 034c0b95b2f9cc6440bac8b5844abfdc97db8990 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 17 Oct 2015 11:05:12 -0400 Subject: 3.0.5768.1 --- MediaBrowser.Common.Implementations/BaseApplicationHost.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Common.Implementations/BaseApplicationHost.cs') diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs index 97c856035..6dc97100d 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs @@ -416,6 +416,8 @@ namespace MediaBrowser.Common.Implementations /// protected virtual void FindParts() { + RegisterModules(); + ConfigurationManager.AddParts(GetExports()); Plugins = GetExports(); } @@ -481,7 +483,6 @@ namespace MediaBrowser.Common.Implementations IsoManager = new IsoManager(); RegisterSingleInstance(IsoManager); - RegisterModules(); return Task.FromResult (true); } @@ -524,6 +525,14 @@ namespace MediaBrowser.Common.Implementations } catch (ReflectionTypeLoadException ex) { + if (ex.LoaderExceptions != null) + { + foreach (var loaderException in ex.LoaderExceptions) + { + Logger.Error("LoaderException: " + loaderException.Message); + } + } + // If it fails we can still get a list of the Types it was able to resolve return ex.Types.Where(t => t != null); } -- cgit v1.2.3