diff --git a/CHANGELOG.md b/CHANGELOG.md index 4042686f..083462ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Use a string interpolation and escape single quotes when escaping tables (@drunderscore) * Removed obsolete resource files `TShockAPI/Resources.resx` and `TShockAPI/Resources.Designer.cs`. (@Arthri) * Fixed hardcore and mediumcore not banning on death when settings are enabled. This also alters the TSPlayer.Ban method to remove the force option which is no longer needed. (@SignatureBeef) +* Plugins and ./bin dependencies are now loaded relative to the launcher, this improves the use of startup files (@SignatureBeef) ## TShock 4.5.18 * Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph) diff --git a/TShockLauncher/Program.cs b/TShockLauncher/Program.cs index 0410f341..1f47c837 100644 --- a/TShockLauncher/Program.cs +++ b/TShockLauncher/Program.cs @@ -42,7 +42,7 @@ Assembly? Default_Resolving(System.Runtime.Loader.AssemblyLoadContext arg1, Asse if (arg2?.Name is null) return null; if (_cache.TryGetValue(arg2.Name, out Assembly? asm) && asm is not null) return asm; - var loc = Path.Combine(Environment.CurrentDirectory, "bin", arg2.Name + ".dll"); + var loc = Path.Combine(AppContext.BaseDirectory, "bin", arg2.Name + ".dll"); if (File.Exists(loc)) asm = arg1.LoadFromAssemblyPath(loc);