From 08c4b1cc5cbe72ee62a1ca54780e0905fafea7bd Mon Sep 17 00:00:00 2001 From: StiefelJackal Date: Tue, 17 Dec 2024 13:00:01 -0500 Subject: [PATCH] update MonoMod.Core to 1.2.2 to address net9 issue --- Directory.Build.props | 2 +- HarmonyTests/IL/TestMethodBodyReader.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 2803fc46..b03534fe 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 2.3.3.0 - 1.2.1 + 1.2.2 diff --git a/HarmonyTests/IL/TestMethodBodyReader.cs b/HarmonyTests/IL/TestMethodBodyReader.cs index 99e7668b..003a22fe 100644 --- a/HarmonyTests/IL/TestMethodBodyReader.cs +++ b/HarmonyTests/IL/TestMethodBodyReader.cs @@ -66,7 +66,11 @@ public void Test_CanGetInstructionsWithNoILGenerator() #else Assert.AreEqual("System.Reflection.LocalVariableInfo", instrNoGen.argument.GetType().FullName, "w/o generator argument type @ {0} ({1})", i, instrNoGen); #endif +#if NET9_0_OR_GREATER + Assert.AreEqual(Type.GetType("System.Reflection.Emit.RuntimeLocalBuilder"), instrHasGen.argument.GetType(), "w/ generator argument type @ {0} ({1})", i, instrNoGen); +#else Assert.AreEqual(typeof(LocalBuilder), instrHasGen.argument.GetType(), "w/ generator argument type @ {0} ({1})", i, instrNoGen); +#endif } } }