LavaGang / MelonLoader

The World's First Universal Mod Loader for Unity Games compatible with both Il2Cpp and Mono
https://discord.gg/2Wn3N2P
Apache License 2.0
2.38k stars 472 forks source link

Game crashing on start - Could not load file or assembly MonoMod.RuntimeDetour #525

Closed Xenovail closed 3 days ago

Xenovail commented 1 year ago

All of the following criteria must be met

All of the following are optional to answer

Describe the issue.

Latest.log

When I try starting the game I get the message below and the game crashes

[17:02:39.524] ------------------------------ [17:02:39.524] MelonLoader v0.6.1 Open-Beta [17:02:39.526] OS: Windows 11 [17:02:39.526] Hash Code: 696B58144EEC73C72FA36A811CA73312EEE4EC28AD5E3527BDA1E14F388A [17:02:39.526] ------------------------------ [17:02:39.526] Game Type: Il2cpp [17:02:39.527] Game Arch: x64 [17:02:39.527] ------------------------------ [17:02:39.527] Core::BasePath = C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6 [17:02:39.527] Game::BasePath = C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6 [17:02:39.527] Game::DataPath = C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6\BloonsTD6_Data [17:02:39.528] Game::ApplicationPath = C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6\BloonsTD6.exe [17:02:39.528] Runtime Type: net6 [17:02:39.618] ------------------------------ [17:02:39.618] Game Name: BloonsTD6 [17:02:39.618] Game Developer: Ninja Kiwi [17:02:39.620] Unity Version: 2021.3.16f1 [17:02:39.620] Game Version: 38.3 [17:02:39.620] ------------------------------

[NewEntryPoint] Caught exception invoking Initialize! System.TypeInitializationException: The type initializer for 'HarmonyLib.Harmony' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'MonoMod.RuntimeDetour, Version=22.3.23.4, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. File name: 'MonoMod.RuntimeDetour, Version=22.3.23.4, Culture=neutral, PublicKeyToken=null' at HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.Install() at HarmonyLib.Harmony..cctor() --- End of inner exception stack trace --- at HarmonyLib.Harmony..ctor(String id) at MelonLoader.Core.Initialize() in D:\a\MelonLoader\MelonLoader\MelonLoader\Core.cs:line 72 at MelonLoader.NativeHost.MelonLoaderInvoker.Initialize() in D:\a\MelonLoader\MelonLoader\MelonLoader.NativeHost\MelonLoaderInvoker.cs:line 10 at MelonLoader.NativeHost.NativeEntryPoint.Initialize() in D:\a\MelonLoader\MelonLoader\MelonLoader.NativeHost\NativeEntryPoint.cs:line 43

Did you attach your log file?

RinLovesYou commented 1 year ago

it must have gotten deleted by either you or your antivirus. Turn off your antivirus or make an exception for the MelonLoader folder, then reinstall it.

hexahigh commented 9 months ago

Im having the same issue. Fresh install, no antivirus. The game is a 64bit game which uses IL2CPP.

Barragek0 commented 8 months ago

Same here, fresh install, no antivirus, restarted pc.

DestinyMKas commented 7 months ago

I had same issue when installed with automatic melon loader. Then uninstalled and installed manually. Instruction can be found here: https://github.com/LavaGang/MelonLoader/blob/master/README.md

mindgorgon commented 6 days ago

yeah i have a anti virus but melonloader is not getting detected and im having the error 'system.io.filenotexception' so what do i do please tell me