I don't know, which is why I was vague in my reply. It's not something you can just quickly change with zero knowledge.
https://github.com/gluck/il-repack
Merging the assemblies after build might be fine to do, but again, I do not think you need to do this. Plugin files really should be kept as separate files.
ILMerge or change the PKHeX.WinForms to build including dlls in a folder; change PKHeX's settings to load plugins from within the assembly.
Ideally, you don't do this because there's no real need to.
Hack your 3DS, then you can edit the save data from Gen7.
Change the entity converter setting to allow backwards conversion / incompatible conversions. Then you can drop a pk9 into a pk7 and fix any remaining issues.
24/03/10 - New Update:
Legality: Added Encounter Slot RNG correlation checks for Gen4 (and Gen3). Because Encounter Type PID mismatch wasn't enough!
Gen3 correlations are complicated by vblanks, so with PKHeX's default settings it does not raise a flag. Basically, the program tries to check the encounter conditions (if you need a specific lead), and indicates if it is unable to determine how that frame was encountered.
Open your Gen7 save file, enable the setting, drop in the pk9, fix any issues, then clone it and import until you find a satisfactory value after HOME migrates it.
If the Trainer Info editor has badges editable, sure, but really, you should just play the game as intended. Usually, Pokémon with your OT will always obey you.
Invalid save file format, completely wrong size. I was able to rip out some PK6 files though (3 party, 41 from box). Should match what you mentioned (Treecko, Mightyena, and Pikachu-Rockstar are present).
extract.rar
As has been stated multiple times throughout this thread, this program is only built for specific ROMs that have not been adjusted. You're trying to use the Vanilla BB2/VW2 version on "redux" which is a different ROM build.
main
Same weird corruption as someone else in another thread, where 0x1F bytes of data gets misplaced in the box data somehow, causing a big misalignment. Should be 99.9999% good to go.
It's nonsense randomness. Open a valid save file in a hex editor and scroll through it, and do the same for yours. Even without knowing what it should be, you'll be able to tell that the data is not what it should be.
Probably not restoring it to your cartridge correctly.
Save data doesn't magically revert, it only stores what it has available, and RBY have no backup save file functionality, so any changes visible in PKHeX should be visible once correctly restored.
PKHeX has a setting you can enable to turn on backwards conversion, but it isn't perfect. You'd have to manually add the information that was lost during transfer (such as 3DS origin info).
Since you modified one of the immutable values, HOME will know and will reject it if you try to move it back in. PKHeX does not know the HOME upload data, it only has the data from the sav/PKM.
You can try manually transferring it back to Gen7 and then retry transferring to HOME until you get a satisfactory value, but that's something that HOME can potentially detect in the future (importing same values).