The BepInEx preloader error usually means missing files, a wrong install path, or a mod manager overwriting the loader.
When BepInEx throws the red [Fatal : BepInEx] Could not run preloader line, the game often still opens, but your mods stay off. That message means the loader failed before it could patch the game assembly, so none of your plugins load even though the title screen appears.
This guide walks you through reading the log, spotting the real cause, and fixing the problem in a way that survives updates and mod manager changes. You can follow the steps even if you have never touched a configuration file before, as long as you are comfortable opening folders and copying files.
Common Reasons BepInEx Could Not Run Preloader
The same red message hides several different root causes. The log right under the fatal line usually tells you which one you have. Unity games such as Valheim tend to hit the same patterns over and over, so once you match the wording, you already know the likely fix.
| Error Detail In Log | What It Points To | Typical Fix |
|---|---|---|
DirectoryNotFoundException: ...\unstripped_corlib |
Game debug folders missing or broken. | Regenerate unstripped folders or reinstall loader pack. |
ArgumentException: element with same key already exists |
Two patchers or duplicate BepInEx installs. | Remove old installs and keep one clean copy. |
| Log mentions Vortex or another manager | Manager overwrites BepInEx files on deploy. | Let one tool manage BepInEx or switch manager. |
Quick scan: open LogOutput.log inside the BepInEx folder in a text editor and jump to the bottom. The line or two directly beneath the fatal preloader message usually names the exact file or folder that failed, along with the full path that BepInEx tried to use.
If the error keeps coming back and the log always points at the same missing path, do not just click past it. That line already tells you whether you are dealing with a bad folder path, a wrong loader version, or a mod manager that keeps rewriting files every time you deploy mods.
Check That BepInEx Sits In The Right Place
A large share of bepinex could not run preloader messages come from a simple path mismatch. BepInEx expects to live next to the game executable, not in a random mods folder or nested inside another directory created by a tool.
- Find the game folder — Use Steam, GOG, or your launcher menu to open the local files for the game you want to mod.
- Locate the main executable — Look for the file with the game name and
.exeat the end on Windows, or the main app on other systems. - Confirm BepInEx next to it — The
BepInExfolder,doorstop_config.ini, and any loader files should sit in that same directory.
If BepInEx sits inside another folder such as GameName\BepInExPack or a mod manager staging area, the loader might start from the wrong path and fail before it even reads your plugins. In that case, the game runs as if there were no mods at all, and the preloader error appears in the console or window.
Deeper fix: drag the entire contents of the BepInEx pack into the game directory so that there is only one BepInEx folder at the top level. Then delete any extra copies under subfolders created by mod managers that you no longer use, so the game cannot accidentally launch from an outdated instance.
As a quick sanity check, launch the game from the same folder where BepInEx lives by double-clicking the executable. If the error does not appear in that case but does appear when you start from a shortcut or mod manager, something in the launch path is still wrong.
Fix Missing Or Broken Unstripped Corlib Folders
Many reports of bepinex could not run preloader show a System.IO.DirectoryNotFoundException that points at an unstripped_corlib path. Unity games sometimes ship separate debug assemblies that BepInEx needs to patch. If those folders are missing or broken, the loader has nothing to work with and bails out.
- Check the folders — In the game directory, look for
unstripped_corliband, in some setups,unstripped_managed. - Compare to a fresh pack — Download the matching BepInEx pack for your game and version, then compare the folder names and file counts.
- Regenerate from mod manager — If you use r2modman or a Thunderstore profile, create a new profile or reinstall the BepInEx pack through that tool so it recreates the debug folders.
- Run game file verification — In Steam or your launcher, run the verify or repair step so missing or broken game files get restored.
In many Valheim cases, players fixed the error by renaming old unstripped_corlib and unstripped_managed folders, then letting r2modman or another Thunderstore tool rebuild them with fresh copies. Once the new debug assemblies matched the log paths, the preloader started clean and mods loaded again.
Before you delete anything, make a simple backup by adding _backup to the old folder names. That way you can roll back if a replacement goes wrong, and you can compare file sizes if you suspect a partial download or a disk issue.
Clean Up Duplicate Installs And Patchers
Another common trigger is two different loaders or patchers stacked on top of each other. A log line that mentions an element with the same key already in a dictionary, or several preloader patcher plugins, often points at this clash of older and newer setups.
- Search for extra BepInEx folders — Inside the game directory and its subfolders, look for any second
BepInExdirectory left behind by older packs. - Check for other loaders — See whether Harmony, IPA, MelonLoader, or other patch systems sit in the same folder and hook the same executable.
- Read the patcher list — Near the top of the log, BepInEx lists all preloader patchers it loads. Two entries with similar names can point at leftover files from a previous setup.
Quick clean: back up your BepInEx/plugins folder, then delete every BepInEx related file from the game directory. Install a fresh pack that matches your platform and game build, then copy your plugins back in. This reset alone fixes many preloader failures that trace back to experiments with old loaders or manual tweaks that no longer match the current version.
While you are there, look through BepInEx/patchers. Some mod packs drop extra patcher DLLs that change how assemblies load. If you see patchers that you no longer use, remove them one by one and retest until the error disappears, so you know which one caused the original clash.
Stop Mod Managers From Overwriting The Loader
Many users first see this error after switching to Vortex or another manager. The game runs bare with no mods, or only part of the plugin list loads, and each deployment brings the red preloader line back again even after a clean reinstall.
- Pick one manager — If you mix manual installs with Vortex, r2modman, or another tool, pick one method and stick with it so files no longer fight each other.
- Let the manager handle BepInEx — Some tools ship a dedicated BepInEx pack for the game. Enable that pack and avoid manual edits inside the managed instance.
- Or go full manual — Turn off the manager for that game, delete its BepInEx copy, and keep only the manual install in the game directory.
- Check deployment path — In Vortex style tools, confirm that the deployment location is the same folder that holds the actual game executable.
For Valheim, many players moved from Vortex to r2modman and noticed that the preloader error disappeared once the new profile created fresh unstripped folders and stopped the constant file rewrites. The same pattern holds for other Unity titles: once a single tool owns the loader files, the preloader becomes predictable.
When you test changes, deploy once, then start the game and read the log before touching anything else. Rapid back-to-back deployments from different tools can hide which change fixed the problem and can bring the same error back on the next session.
Match BepInEx Version To Your Game Build
BepInEx comes in different branches, platforms, and bitness. If you pair the wrong pack with your game build, the loader might start but fail as soon as it tries to inspect assemblies. This sometimes shows up as a generic preloader failure without an obvious missing file in the log.
- Check 32 or 64 bit — Confirm whether the game uses 32 bit or 64 bit binaries and download the matching BepInEx release.
- Pick the right runtime — Some games need a mono build, others a IL2CPP or special pack. The official documentation lists known packs for popular games.
- Avoid bleeding edge builds at first — Start with the latest stable loader for your game. Move to testing builds only when a mod author calls for it.
- Read the game log too — When Unity itself throws errors before BepInEx runs, crash reports in the game log can hint at mismatched runtimes.
If you updated the game and the preloader stopped working on the same day, try the newer stable BepInEx release built for that Unity version. Mod loaders often need a fresh build when developers move to a new engine release, and mixing old loader binaries with a new engine tends to trigger early failures during assembly scans.
It helps to keep a small text file in your mod folder listing which BepInEx version you used for each game. When something breaks after a patch, you can compare that note against the release list and grab the next stable build without guessing.
Final Checks Before You Launch Again
After you fix paths, debug folders, manager clashes, and version mismatches, it helps to run through a short checklist before the next launch. This lowers the chance that the same preloader error returns after the next game update or mod session.
- One loader only — Keep just one BepInEx install per game, in the folder with the main executable, with no stray copies in subfolders.
- Fresh debug folders — Confirm that
unstripped_corliband related folders exist, with files that match the paths shown in the log. - Clean mod manager setup — Use either manual install or a single manager whose deployment path matches the game folder.
- Backup of plugins — Store a copy of your plugin list somewhere safe so a full reinstall does not wipe months of tweaking.
- Log check on each update — After every big game patch, scan the first few lines of the log to confirm that the preloader still starts without red text.
If you move to a new PC or reinstall the game later, you can reuse this same checklist. Drop in the right BepInEx version, confirm folder paths, keep one manager in charge, and the preloader should stay quiet so your mods can do their job. A few minutes with the log and folders now saves long sessions of trial and error each time a new patch or mod pack lands.
