diff --git a/src/ReportPortal.Shared/Extensibility/ExtensionManager.cs b/src/ReportPortal.Shared/Extensibility/ExtensionManager.cs index 8a0e477f..b8369d40 100644 --- a/src/ReportPortal.Shared/Extensibility/ExtensionManager.cs +++ b/src/ReportPortal.Shared/Extensibility/ExtensionManager.cs @@ -14,10 +14,17 @@ public class ExtensionManager : IExtensionManager { var ext = new ExtensionManager(); - var assemblyLocation = AppContext.BaseDirectory; - _traceLogger.Verbose($"Executing assembly location: {assemblyLocation}"); + var extentionDirectories = new List + { + AppContext.BaseDirectory, + Path.GetDirectoryName(typeof(ExtensionManager).Assembly.Location), + Environment.CurrentDirectory, + }; - ext.Explore(assemblyLocation); + foreach (var extentionDirectory in extentionDirectories) + { + ext.Explore(extentionDirectory); + } return ext; }); @@ -38,13 +45,13 @@ public void Explore(string path) { if (!_exploredPaths.Contains(path)) { + _traceLogger.Info($"Exploring extensions in '{path}' directory."); + var reportEventObservers = new List(); var commandsListeners = new List(); var currentDirectory = new DirectoryInfo(path); - _traceLogger.Info($"Exploring extensions in '{currentDirectory}' directory."); - foreach (var file in currentDirectory.GetFiles("*ReportPortal*.dll")) { _traceLogger.Verbose($"Found '{file.Name}' and loading it into current AppDomain."); @@ -108,6 +115,10 @@ public void Explore(string path) } } } + else + { + _traceLogger.Verbose($"The extensions '{path}' path was visited before, skipping"); + } } public IList ReportEventObservers { get; } = new List();