
[Bug]: MelonLoader.Fixes.DotnetAssemblyLoadContextFix.PreAlcLoadFromPath throws BadImageFormatException on working netstandard2.0 assemblies.
xiaoxiao921 opened this issue ยท 1 comments
All of the following criteria must be met
- All Requirements must be installed.
- Changed the title so that it doesn't just says "[Bug]: "
- I have searched the GitHub issues for my bug, even in the closed issues.
All of the following are optional to answer
- Tried reinstalling the Game.
- Tried reinstalling MelonLoader.
- Tried restarting PC.
- Was able to see the Start Screen.
Describe the issue.
The check is busted, not sure why it's even here in the first place as the runtime should handle this just fine on its own.
[03:19:15.613] [OverlayDearImGui_MelonIL2CPP] System.BadImageFormatException: Could not load file or assembly 'SharpDX, Version=4.2.0.0, Culture=neutral, PublicKeyToken=null'. An attempt was made to load a program with an incorrect format.
File name: 'SharpDX, Version=4.2.0.0, Culture=neutral, PublicKeyToken=null' ---> System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at MelonLoader.Fixes.DotnetAssemblyLoadContextFix.PreAlcLoadFromPath(String ilPath) in D:\a\MelonLoader\MelonLoader\MelonLoader\Fixes\DotnetAssemblyLoadContextFix.cs:line 94
at NativeDetour_Wrapper<System.Runtime.Loader.AssemblyLoadContext::LoadFromPath>?0(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at MelonLoader.Resolver.SearchDirectoryManager.Scan(String requestedName) in D:\a\MelonLoader\MelonLoader\MelonLoader\Resolver\SearchDirectoryManager.cs:line 0
at MelonLoader.Resolver.AssemblyManager.SearchAssembly(String requestedName, Version requestedVersion) in D:\a\MelonLoader\MelonLoader\MelonLoader\Resolver\AssemblyManager.cs:line 54
at MelonLoader.Resolver.AssemblyManager.Resolve(AssemblyLoadContext alc, AssemblyName name) in D:\a\MelonLoader\MelonLoader\MelonLoader\Resolver\AssemblyManager.cs:line 89
at System.Runtime.Loader.AssemblyLoadContext.GetFirstResolvedAssemblyFromResolvingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
at OverlayDearImGui.Overlay.Render(String windowName, String windowClass, String assetsFolderPath, String imguiIniConfigFolderPath, IConfigEntry`1 overlayToggleKeybind, String cimguiDllFilePath)
at OverlayDearImGui.MelonIL2CPP.OverlayDearImGuiMelonIL2CPP.OnInitializeMelon() in C:\Users\Quentin\Desktop\OverlayDearImGui\OverlayDearImGui.IL2CPP\OverlayDearImGuiMelonIL2CPP.cs:line 21
at MelonLoader.MelonBase.LoaderInitialized() in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\MelonBase.cs:line 447
Did you attach your log file?
Yes, I attached my log file to the text box above.