diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-08-03 19:03:51 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-08-03 19:03:51 -0400 |
commit | 6b0d13be7c8383785cc3152d502959b15468b234 (patch) | |
tree | c8cae5c83087ec7a6fd7d8940fa084a87c7fac23 /src/SMAPI | |
parent | ef1eff669d8a6a277c12c0b84e16402de7f026d4 (diff) | |
download | SMAPI-6b0d13be7c8383785cc3152d502959b15468b234.tar.gz SMAPI-6b0d13be7c8383785cc3152d502959b15468b234.tar.bz2 SMAPI-6b0d13be7c8383785cc3152d502959b15468b234.zip |
fix Mono.Cecil failing to resolve references to SMAPI in some edge cases
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/AssemblyLoader.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs index 3606eb66..2b71038a 100644 --- a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs +++ b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs @@ -61,6 +61,7 @@ namespace StardewModdingAPI.Framework.ModLoading this.AssemblyDefinitionResolver = this.TrackForDisposal(new AssemblyDefinitionResolver()); this.AssemblyDefinitionResolver.AddSearchDirectory(Constants.ExecutionPath); this.AssemblyDefinitionResolver.AddSearchDirectory(Constants.InternalFilesPath); + this.AssemblyDefinitionResolver.Add(AssemblyDefinition.ReadAssembly(typeof(SGame).Assembly.Location)); // for some reason Mono.Cecil can't resolve SMAPI in very specific cases involving unofficial 64-bit Stardew Valley when launched through Steam (for some players only) // generate type => assembly lookup for types which should be rewritten this.TypeAssemblies = new Dictionary<string, Assembly>(); |