diff --git a/neo/Plugins/Plugin.cs b/neo/Plugins/Plugin.cs index 59699e7562..862ff6ae9a 100644 --- a/neo/Plugins/Plugin.cs +++ b/neo/Plugins/Plugin.cs @@ -97,7 +97,8 @@ internal static void LoadPlugins(NeoSystem system) if (!Directory.Exists(pluginsPath)) return; foreach (string filename in Directory.EnumerateFiles(pluginsPath, "*.dll", SearchOption.TopDirectoryOnly)) { - Assembly assembly = Assembly.LoadFile(filename); + var file = File.ReadAllBytes(filename); + Assembly assembly = Assembly.Load(file); foreach (Type type in assembly.ExportedTypes) { if (!type.IsSubclassOf(typeof(Plugin))) continue;