diff --git a/BepInEx.Core/Bootstrap/BaseChainloader.cs b/BepInEx.Core/Bootstrap/BaseChainloader.cs index a0705af..c6fe182 100644 --- a/BepInEx.Core/Bootstrap/BaseChainloader.cs +++ b/BepInEx.Core/Bootstrap/BaseChainloader.cs @@ -125,7 +125,7 @@ public abstract class BaseChainloader /// Contains information about what certain plugins were not loaded. /// public List DependencyErrors { get; } = new(); - + /// /// Occurs after a plugin is loaded. /// @@ -404,7 +404,7 @@ public abstract class BaseChainloader Logger.Log(LogLevel.Info, $"Loading [{plugin}]"); if (!loadedAssemblies.TryGetValue(plugin.Location, out var ass)) - loadedAssemblies[plugin.Location] = ass = Assembly.LoadFile(plugin.Location); + loadedAssemblies[plugin.Location] = ass = Assembly.LoadFrom(plugin.Location); Plugins[plugin.Metadata.GUID] = plugin; TryRunModuleCtor(plugin, ass); diff --git a/BepInEx.Core/Utility.cs b/BepInEx.Core/Utility.cs index 0f73bd3..a6b93bd 100644 --- a/BepInEx.Core/Utility.cs +++ b/BepInEx.Core/Utility.cs @@ -242,7 +242,7 @@ public static class Utility /// The loaded assembly. /// True, if the assembly was found and loaded. Otherwise, false. public static bool TryResolveDllAssembly(AssemblyName assemblyName, string directory, out Assembly assembly) => - TryResolveDllAssembly(assemblyName, directory, Assembly.LoadFile, out assembly); + TryResolveDllAssembly(assemblyName, directory, Assembly.LoadFrom, out assembly); /// /// Try to resolve and load the given assembly DLL. diff --git a/Runtimes/NET/BepInEx.NET.Shared/SharedEntrypoint.cs b/Runtimes/NET/BepInEx.NET.Shared/SharedEntrypoint.cs index 819bcb9..47d9db8 100644 --- a/Runtimes/NET/BepInEx.NET.Shared/SharedEntrypoint.cs +++ b/Runtimes/NET/BepInEx.NET.Shared/SharedEntrypoint.cs @@ -139,6 +139,6 @@ namespace BepInEx.NET.Shared /// The loaded assembly. /// True, if the assembly was found and loaded. Otherwise, false. public static bool TryResolveDllAssembly(AssemblyName assemblyName, string directory, out Assembly assembly) => - TryResolveDllAssembly(assemblyName, directory, Assembly.LoadFile, out assembly); + TryResolveDllAssembly(assemblyName, directory, Assembly.LoadFrom, out assembly); } }