Skip to content
Permalink
Browse files

Fix #101

  • Loading branch information
denikson committed Nov 12, 2019
1 parent cb78681 commit 7c4afe18f80785cc8cbfecaa466937b08a13de38
Showing with 11 additions and 1 deletion.
  1. +11 −1 BepInEx.Preloader/Patching/AssemblyPatcher.cs
@@ -180,7 +180,17 @@ public static void PatchAndLoad(string directory)

foreach (string assemblyPath in Directory.GetFiles(directory, "*.dll"))
{
var assembly = AssemblyDefinition.ReadAssembly(assemblyPath);
AssemblyDefinition assembly;

try
{
assembly = AssemblyDefinition.ReadAssembly(assemblyPath);
}
catch (BadImageFormatException)
{
// Not a managed assembly, skip
continue;
}

//NOTE: this is special cased here because the dependency handling for System.dll is a bit wonky
//System has an assembly reference to itself, and it also has a reference to Mono.Security causing a circular dependency

0 comments on commit 7c4afe1

Please sign in to comment.
You can’t perform that action at this time.