BepInEx / HarmonyX

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

Assembly duplication after patching memory loaded assembly #72

Open deltaone opened 1 year ago

deltaone commented 1 year ago

Assembly game = Assembly.Load(File.ReadAllBytes(Path.Combine(AssemblyFolder, "target.exe"))); -> get two target assembly assembly (one patched, one not)

Assembly game = Assembly.LoadFile(Path.Combine(AssemblyFolder, "target.exe")); -> all ok, have one patched assembly

How avoid this, i use runtime prepatch with Cecil and loading modified assembly from memory ...

double.zip