Some game developers tend to enable assembly stripping when releasing this game. It's an option that barely saves any space and is generally a nuisance for game modders yet for some reason still available for PC.
In most cases the issue can be fixed by restoring the stripped assemblies.
NOTE
This is not a definitive guide. You may need to adjust it to your own needs. Don't hesitate to experiment and ask for help when stuck.
Before you start the painful work, check that at least one of these applies to your game. It's fine if you don't, but checking first will save you about 0.5-2 hours of your life.
Unusual MissingMethodException
s or TypeLoadException
s when using BepInEx.
If you install clean BepInEx and run it, you may stumble upon MissingMethodException
s.
Such examples are
System.MissingMethodException: void System.Reflection.Module.GetPEKind(System.Reflection.PortableExecutableKinds&,System.Reflection.ImageFileMachine&)
Core DLLs are small
Go to <Game Name>_Data/Managed
folder and check filesizes of some core libraries.
Their sizes should be within the following ranges:
mscorlib.dll
: over 3.5 MBSystem.dll
: over 2.5 MBSystem.Core.dll
: about 1 MBIf these files are a lot smaller than these reference sizes, your game might have stripped DLLs.
Check your game's Unity version. You can do it one of the following ways:
Open Properties
of the game's executable and check its file version:
First three numbers (X.Y.Z
) are the Unity version
Open <Game Name>_Data/globalmanagers
in a text editor (e.g. Notepad). At the very beginning, find a string that looks like a version number:
In your browser, go to https://unity.bepinex.dev/corlibs/<unity version>.zip
where <unity version>
is the Unity version of the game, e.g. 2019.4.24
.
Extract the assemblies into a temporary folder
In your browser, go to https://unity.bepinex.dev/libraries/<unity version>.zip
where <unity version>
is the Unity version of the game, e.g. 2019.4.24
. Download the ZIP and extract it into the same temporary folder.
Take all assemblies you have copied into the temporary folder and move them into <Game Name>_Data/Managed
. Overwrite when asked.
Create folder named unstripped_corlib
in your game folder (the folder where the game EXE resides)
Move the assemblies you copied into unstripped_corlib
Open doorstop_config.ini
in a text editor of your choise (e.g. Notepad)
Find option named dllSearchPathOverride
and set it to the following:
Run the game