SamboyCoding / RimworldBetterLoading

Mod for the game RimWorld to add a fancier loading screen.
https://steamcommunity.com/sharedfiles/filedetails/?id=1999454301
21 stars 10 forks source link

Stop copying `0harmony.dll` into the release #16

Closed slippycheeze closed 2 years ago

slippycheeze commented 2 years ago

This marks the nuget harmony library as private, for build only, so that 0harmony.dll is no longer copied into the build target. Since the mod uses the shipped-from-workshop harmony mod, this is how things should be.

I also bumped the harmony version to 2.2.1 to match the current steam harmony mod. Not strictly necessary, but since 2.2.1 brings back CodeMatcher, definitely nice to have for that vastly smoother Transpiler patch writing experience.

SamboyCoding commented 2 years ago

Does this actually work? I've definitely tried doing this before and it made no difference - the 0harmony dll was copied anyway. When I looked online, the consensus seemed to be that you couldn't not copy dlls from nuget packages. Either way, I usually attempt to remove the dll manually when I upload a release, though sometimes I forget, but it shouldn't even matter as the mod requires harmony to load prior to it, so the assembly in the BL folder should be ignored.

That said, if this does work, I'm happy to merge it.

slippycheeze commented 2 years ago

Yeah, works for me with the latest "free" visual studio. It is ... picky about working. Theoretically you just need the <ExcludedAssets>runtime</ExcludedAssests> tag, but I found that didn't work. The version where I explicitly included others, etc, did.

So ... all very microsoft, really, and I say that with the affection of someone who has worked with their quirky software since windows 3.0 got people really excited. :)

Anyway, should do the trick. If it doesn't, please let me know!

slippycheeze commented 2 years ago

Oh! You will have to manually delete any copy of the harmony DLL in the output directory. NMake / Visual Studio won't do that after you add this manually to the .csproj file, because it's rude stateless. It shouldn't copy it into place again though.