From 167d5831d12f0b7c58b3533b716f9041f6ae02e7 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 23 Jul 2021 20:29:44 -0400 Subject: 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. --- src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/Framework/TemporaryHacks') 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)) -- cgit