HarmonyX
HarmonyX copied to clipboard
System.Reflection.Emit.ILGeneration is not supported on this platform when using Transpilers.
Using the latest release of HarmonyX, it keeps throwing not supported on this platform when using Transpilers. They work fine in BepInEx 6.0.0-pre.1. but the version of Harmony BepInEx uses is 2.10.1. I wanted to try also use this same version but its missing HarmonyPatchCategory
so I couldn't compile my mod loader.
I remember in the past for .NET Standard (Unity) games we needed to add a version of mscorlib.dll
that was not stripped down to remove runtime code generation. However I thought after Harmony started using MonoMod, this was no longer the case? Anyways putting that old patch in didn't solve the problem, so I assume this is something new.
Looking at BepInEx's assemblies it loads there was some differences between mine.
I need to add
- System.Reflection.Emit.ILGeneration.dll
- System.Reflection.Emit.Lightweight.dll
To load HarmonyX, otherwise I get this error message from Doorstop
`System.TypeInitializationException: The type initializer for 'HarmonyLib.Harmony' threw an exception. ---> System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MonoMod.Logs.DebugLog' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MonoMod.Switches' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MonoMod.Utils.Extensions' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.Emit.Lightweight, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.`
Has anyone used the version 2.13.0 and got Transpilers to work?