diff --git a/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs b/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs index 233c1899..a0499c5d 100644 --- a/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs +++ b/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs @@ -517,7 +517,8 @@ private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEven Assembly assembly; if (!loadedAssemblies.TryGetValue(fileName, out assembly)) { - assembly = Assembly.Load(File.ReadAllBytes(path)); + var pdbPath = Path.ChangeExtension(fileName, ".pdb"); + assembly = Assembly.Load(File.ReadAllBytes(path), File.Exists(pdbPath) ? File.ReadAllBytes(pdbPath) : null); // We just do this to return a proper error message incase this is a resolved plugin assembly // referencing an old TerrariaServer version. if (!InvalidateAssembly(assembly, fileName))