Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Neo/Plugins/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

using Microsoft.Extensions.Configuration;
using System.Reflection;
using System.Runtime.Loader;
using static System.IO.Path;

namespace Neo.Plugins;
Expand Down Expand Up @@ -211,7 +212,9 @@ private static void LoadPlugin(Assembly assembly)
internal static void LoadPlugins()
{
if (!Directory.Exists(PluginsDirectory)) return;
List<Assembly> assemblies = [];
List<Assembly> assemblies = AssemblyLoadContext.Default.Assemblies
.Where(p => p.FullName?.StartsWith("Neo") == true)
.ToList();
foreach (var rootPath in Directory.GetDirectories(PluginsDirectory))
{
foreach (var filename in Directory.EnumerateFiles(rootPath, "*.dll", SearchOption.TopDirectoryOnly))
Expand Down