BepInEx / HarmonyX

Harmony built on top of MonoMod.RuntimeDetours with additional features
MIT License
356 stars 44 forks source link

Added Mono.Cecil Type Forwarding #68

Closed Aragas closed 8 months ago

Aragas commented 1 year ago

This is just a copy-paste of BepinEx type forwarding, it works as expected. The forwarding is only added to .NET Framework, as .NET Standard is not supported by Harmony and on .NET (Core) the dependencies are external. Fixes #67

Aragas commented 1 year ago

Hello again! Could this be reviewed in the nearest future? This is a blocker for our HarmonyX switch in Bannerlord! As a workaround, we might potentially fork it and wait for the PR/Issue resolution in the standard manner, but worst case we'll use this PR as a solution and we'll distribute a compiled HarmonyX based on the PR as the replacement of the vanilla Harmony!

Aragas commented 1 year ago

We forked HarmonyX and use that fork for now. We do hope that we can switch to the main HarmonyX later!

ManlyMarco commented 1 year ago

Unless one of the other devs rules otherwise, this is unlikely to get merged since it's a pretty niche use case (I don't think I've seen this issue pop up anywhere else). I suggest approaching the issue like we do in BepInEx and shim the assemblies as necessary.

Aragas commented 1 year ago

Unless one of the other devs rules otherwise, this is unlikely to get merged since it's a pretty niche use case (I don't think I've seen this issue pop up anywhere else). I suggest approaching the issue like we do in BepInEx and shim the assemblies as necessary.

Shimming means that we modify the assemblies in the FS, introducing persistent modifications to files, which can introduce a new set of issues

ManlyMarco commented 1 year ago

If you absolutely can't modify the FS you can just load the modified assemblies from memory. It will require shimming to happen on every game start though.

ManlyMarco commented 8 months ago

Closing since there's no interest.