© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
24 replies
mini

Harmony throws unknown location exception on Patch

I am using Harmony to add a parameter to various log calls of the assembly but whenever I try to Patch it by transpiling it, I get an error:
IL Compile Error (unknown location)
   bei HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo)
   bei HarmonyLib.PatchProcessor.Patch()
   bei HarmonyLib.Harmony.Patch(MethodBase original, HarmonyMethod prefix, HarmonyMethod postfix, HarmonyMethod transpiler, HarmonyMethod finalizer, HarmonyMethod ilmanipulator)
IL Compile Error (unknown location)
   bei HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo)
   bei HarmonyLib.PatchProcessor.Patch()
   bei HarmonyLib.Harmony.Patch(MethodBase original, HarmonyMethod prefix, HarmonyMethod postfix, HarmonyMethod transpiler, HarmonyMethod finalizer, HarmonyMethod ilmanipulator)

Does anyone have an idea why?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

.NET Error Unknown SQL Exception
C#CC# / help
17mo ago
✅ JSON serializing Optional type throws an exception(?)
C#CC# / help
3y ago
HTTP Request throws exception when invoking controller
C#CC# / help
4y ago
✅ async Task throws exception if not explicitly defined
C#CC# / help
3y ago