The Free Software Media System - Server Backend & API
Catch TypeLoadException during plugin loading
David Ullmer4adbbb9f5111
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.csindex 9f597f3ef3..42c76bd66a 100644--- a/Emby.Server.Implementations/Plugins/PluginManager.cs+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs@@ -122,6 +122,12 @@ namespace Emby.Server.Implementations.PluginsChangePluginState(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;