aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Plugins/PluginManager.cs
diff options
context:
space:
mode:
authorDavid Ullmer <daullmer@gmail.com>2021-01-24 00:57:37 +0100
committerDavid Ullmer <daullmer@gmail.com>2021-01-24 00:58:52 +0100
commit4adbbb9f5111d2386f1f0a9c5aaa173d041e9c90 (patch)
treee186eea6e38b4252a5ac9b0b831d14f4fe262a89 /Emby.Server.Implementations/Plugins/PluginManager.cs
parent4aaf71b87383805df740703f4cf3714adf1f6dfd (diff)
Catch TypeLoadException during plugin loading
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs
index 9f597f3ef..42c76bd66 100644
--- a/Emby.Server.Implementations/Plugins/PluginManager.cs
+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs
@@ -122,6 +122,12 @@ namespace Emby.Server.Implementations.Plugins
ChangePluginState(plugin, PluginStatus.Malfunctioned);
continue;
}
+ catch (TypeLoadException ex)
+ {
+ _logger.LogError(ex, "Failed to load assembly {Path}. Disabling plugin. This is probably caused by an incompatible plugin version.", file);
+ ChangePluginState(plugin, PluginStatus.Malfunctioned);
+ continue;
+ }
_logger.LogInformation("Loaded assembly {Assembly} from {Path}", assembly.FullName, file);
yield return assembly;