diff --git a/Torch/Plugins/PluginManager.cs b/Torch/Plugins/PluginManager.cs index e34852c..b2531ea 100644 --- a/Torch/Plugins/PluginManager.cs +++ b/Torch/Plugins/PluginManager.cs @@ -377,6 +377,7 @@ namespace Torch.Managers private void InstantiatePlugin(PluginManifest manifest, IEnumerable assemblies) { Type pluginType = null; + bool mult = false; foreach (var asm in assemblies) { foreach (var type in asm.GetExportedTypes()) @@ -384,16 +385,26 @@ namespace Torch.Managers if (!type.GetInterfaces().Contains(typeof(ITorchPlugin))) continue; + _log.Info($"Loading plugin at {type.FullName}"); + if (pluginType != null) { - _log.Error($"The plugin '{manifest.Name}' has multiple implementations of {nameof(ITorchPlugin)}, not loading."); - return; + //_log.Error($"The plugin '{manifest.Name}' has multiple implementations of {nameof(ITorchPlugin)}, not loading."); + //return; + mult = true; + continue; } pluginType = type; } } + if (mult) + { + _log.Error($"The plugin '{manifest.Name}' has multiple implementations of {nameof(ITorchPlugin)}, not loading."); + return; + } + if (pluginType == null) { _log.Error($"The plugin '{manifest.Name}' does not have an implementation of {nameof(ITorchPlugin)}, not loading.");