Page 1 of 1
Update 1.1.0.9 broke Harmony mods
Posted: Sun Mar 12, 2023 3:57 am
by szszss
DW2 upgraded to .Net 7 and switched to self-contained build since 1.1.0.9. However this update broke all Harmony-based mods. MonoMod, a pre-requirement of Harmony, doesn't support single-file self-contained programs. In
this issue, the developer of MonoMod said it won't support single-file self-contained programs because of many difficulties. This renders any mods that use Harmony ineffective. For them to work properly, either single-file (PublishSingleFile in project config) or self-contained (SelfContained) should be disable. I propose disabling PublishSingleFile, as players won't experience any difference between updates.
Re: Update 1.1.0.9 broke Harmony mods
Posted: Sun Mar 12, 2023 7:07 am
by frankycl
szszss wrote: Sun Mar 12, 2023 3:57 am
(...) For them to work properly, either single-file (PublishSingleFile in project config) or self-contained (SelfContained) should be disable. I propose disabling PublishSingleFile, as players won't experience any difference between updates.
+1
Re: Update 1.1.0.9 broke Harmony mods
Posted: Sun Mar 12, 2023 12:56 pm
by TylerIN
I went over an alternative publish strategy a week ago that uses a normal apphost that should get HarmonyX working. It hasn't been attempted for a beta release yet.
We could also provide our own patch backend if the author doesn't support SelfContained. There is no (legitimately significant) difference that would be an issue. We are using Fody for weaving but I believe the author is mistakingly using the term instead of linking or something else; weaving is not an issue. The linkage stage is where things get messy, but we can work around it.
We do have to drop SingleFile mode as it doesn't work with debuggers despite configuration and MS stating that it should.
Also weird to see someone other than 0xade as the principal authority for monomod, looking like not a particularly great showing with that wontfix. Probably should have been forked.
Re: Update 1.1.0.9 broke Harmony mods
Posted: Sun Mar 12, 2023 1:58 pm
by frankycl
TylerIN wrote: Sun Mar 12, 2023 12:56 pm
I went over an alternative publish strategy a week ago that uses a normal apphost that should get HarmonyX working. It hasn't been attempted for a beta release yet.
(...)
Why not ? - This would be great, I think (and I'm certainly not the only one) - and in the long run we'll certainly need Harmony.
