Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
Harmony-Ref.2.4.0.0.zip | 2025-08-17 | 70.2 kB | |
Harmony-Thin.2.4.0.0.zip | 2025-08-17 | 2.2 MB | |
Harmony-Fat.2.4.0.0.zip | 2025-08-17 | 13.1 MB | |
Harmony 2.4 source code.tar.gz | 2025-08-17 | 2.5 MB | |
Harmony 2.4 source code.zip | 2025-08-17 | 2.7 MB | |
README.md | 2025-08-17 | 3.1 kB | |
Totals: 6 Items | 20.5 MB | 0 |
Harmony 2.4 includes a lot of bug fixes and now supports arm64! Enjoy and consider supporting me on Patreon or become a GitHub sponsor!
Changelog
Added
-
Full support for arm64 across all operating systems, including Apple Silicon
-
Configurable error handler: A new API lets you register a global error handler that Harmony invokes whenever a patch throws an exception. This allows logging or suppressing errors centrally
-
Extended CodeMatcher API: New methods—RemoveSearchForward, RemoveSearchBackward, RemoveUntilForward, RemoveUntilBackward and Do—make it easier to remove or transform instruction sequences via CodeMatcher
-
Struct patching: [HarmonyPatch] attributes can now target methods defined in structs, not just classes
-
Additional MethodType cases: Harmony’s API now covers more method kinds (e.g., async methods, property accessors or operators). This broadens the range of targets you can patch
-
Simpler manual patch registration: The PatchClassProcessor no longer requires Harmony‑specific attributes when registering patches programmatically
Changed
-
Patch serialization: PatchInfo now uses ToArray() instead of MemoryStream.GetBuffer to serialize patches, improving compatibility across .NET runtimes
-
JSON serialization improvements: InnerMethod and patch classes gained custom System.Text.Json converters. Patch information now serializes round‑trip correctly and fields such as infixes were replaced with innerprefixes and innerpostfixes (new infix system)
-
Exception handling: try/fault blocks emitted by Harmony are now compiled as try/catch/finally and won't fail to patch anymore
Fixed
-
Correct index for local variables: CodeInstructionExtensions.LocalIndex now checks whether an operand is a LocalBuilder; it returns the correct LocalIndex instead of converting to int, preventing mis‑indexed local variables in transpilers
-
Infix negative position bug: Matching of negative positions in infix patches was corrected; positions counting from the end now compute the index properly
-
Argument validation for InnerMethod: Creating an InnerMethod now throws ArgumentNullException if method is null and ArgumentException if any position is zero, preventing silent errors
-
Stream memory handling: A bug where patch generation incorrectly used MemoryStream.GetBuffer (which could include unused capacity) was fixed; ToArray is now used instead
-
IL offset logging: IL offsets are logged again and reported accurately when debugging patched methods (commit referenced in release tag).
Removed
- HarmonyException serialization: HarmonyException is no longer marked [Serializable], so it can no longer be marshalled across AppDomains or remoted contexts
New Contributors
- @MSWS made their first contribution in https://github.com/pardeike/Harmony/pull/685
- @Nytra made their first contribution in https://github.com/pardeike/Harmony/pull/682
Full Changelog: https://github.com/pardeike/Harmony/compare/v2.3.6.0...v2.4.0.0