summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-07-23 20:29:44 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-07-23 20:29:44 -0400
commit167d5831d12f0b7c58b3533b716f9041f6ae02e7 (patch)
tree4358a83ff2dbf4de6677ccf14e39d7e2dfb505aa /src/SMAPI
parent88be0cee94cced9a31efe7ff76684514fcdc638d (diff)
downloadSMAPI-167d5831d12f0b7c58b3533b716f9041f6ae02e7.tar.gz
SMAPI-167d5831d12f0b7c58b3533b716f9041f6ae02e7.tar.bz2
SMAPI-167d5831d12f0b7c58b3533b716f9041f6ae02e7.zip
use unmerged Harmony assembly (#711)
Harmony merges Mono.Cecil and MonoMod.Common into its DLL, and keeps some (but not all) of the merged types public. That causes type conflicts in SMAPI's code since it uses both Harmony and Mono.Cecil, and extern aliases break on Linux due to IDE/compiler limitations. This commit uses a custom build of Harmony without the assembly merging, so SMAPI can use and manage Mono.Cecil itself.
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs2
-rw-r--r--src/SMAPI/SMAPI.csproj3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs b/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
index 6814abea..9f5819d7 100644
--- a/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
+++ b/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
@@ -69,7 +69,7 @@ namespace MonoMod.Utils
);
harmony.Patch(
- original: typeof(Harmony).Assembly
+ original: typeof(MonoMod.Utils.ReflectionHelper).Assembly
.GetType("MonoMod.Utils.DynamicMethodDefinition+<>c__DisplayClass3_0")
.GetMethod("<_CopyMethodToDefinition>g__ResolveTokenAs|1", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance),
transpiler: new HarmonyMethod(typeof(MiniMonoModHotfix), nameof(ResolveTokenFix))
diff --git a/src/SMAPI/SMAPI.csproj b/src/SMAPI/SMAPI.csproj
index d36d0d7a..d06e3364 100644
--- a/src/SMAPI/SMAPI.csproj
+++ b/src/SMAPI/SMAPI.csproj
@@ -20,9 +20,10 @@
<ItemGroup>
<PackageReference Include="LargeAddressAware" Version="1.0.5" />
- <PackageReference Include="Mono.Cecil" Version="0.11.3">
+ <PackageReference Include="Mono.Cecil" Version="0.11.4">
<Aliases>MonoCecilPackage</Aliases>
</PackageReference>
+ <PackageReference Include="MonoMod.Common" Version="21.6.21.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Platonymous.TMXTile" Version="1.5.8" />
</ItemGroup>