diff options
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/AssemblyLoader.cs')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/AssemblyLoader.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs index bd29a159..01037870 100644 --- a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs +++ b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs @@ -267,11 +267,8 @@ namespace StardewModdingAPI.Framework.ModLoading // add the assembly's directory temporarily if needed // this is needed by F# mods which bundle FSharp.Core.dll, for example string? temporarySearchDir = null; - if (file.DirectoryName is not null && !this.AssemblyDefinitionResolver.GetSearchDirectories().Contains(file.DirectoryName)) - { - this.AssemblyDefinitionResolver.AddSearchDirectory(file.DirectoryName); + if (this.AssemblyDefinitionResolver.TryAddSearchDirectory(file.DirectoryName)) temporarySearchDir = file.DirectoryName; - } // read assembly AssemblyDefinition assembly; |