Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
What you need to do is not address the symptom (TypeLoadException), but the cause, which is that you have a type which references HarmonyLib, and is an exported type (ie, public class).
The class that references HarmonyLib needs to be a non-public class (either private or internal). Then the error does not occur, and your mod is not load-order dependent.
EDIT: You can see the solutions I proposed to another mod that had this problem, in the "Solutions" section of issue 9
EDIT 2: If you're missing a Runtime 5.0 dependency it means you're probably targeting the wrong framework. You should target .Net Framework 3.5
Issue 9 does not recommend you copy Harmony locally or rename its folder. This is not necessary.
Folder renaming is used to test if a mod is affected. The error happens only in specific circumstances, and the "test your mod" section is a recipe of how to reproduce such a specific circumstance, ie, how to induce a failure of a mod which is already broken.
The same failure-inducing circumstances should not cause a failure in a non-broken mod. Ie, you can use the same test to reliably verify if your mod is susceptible.