diff --git a/IPA/IPA.csproj b/IPA/IPA.csproj
index 8bdc6b60..61f5536f 100644
--- a/IPA/IPA.csproj
+++ b/IPA/IPA.csproj
@@ -118,7 +118,7 @@
-
+
diff --git a/IPA/Program.cs b/IPA/Program.cs
index b6ae36a2..9a7befc1 100644
--- a/IPA/Program.cs
+++ b/IPA/Program.cs
@@ -60,7 +60,23 @@ namespace IPA
catch (Exception) { }
}
- PatchContext context;
+ PatchContext context = null;
+
+ Assembly AssemblyLibLoader(object source, ResolveEventArgs e)
+ {
+ var libsDir = context.LibsPathSrc;
+
+ var asmName = new AssemblyName(e.Name);
+ var testFilen = Path.Combine(libsDir, $"{asmName.Name}.{asmName.Version}.dll");
+
+ if (File.Exists(testFilen))
+ return Assembly.LoadFile(testFilen);
+
+ Console.WriteLine($"Could not load library {asmName}");
+
+ return null;
+ }
+ AppDomain.CurrentDomain.AssemblyResolve += AssemblyLibLoader;
var argExeName = Arguments.CmdLine.PositionalArgs.FirstOrDefault(s => s.EndsWith(".exe"));
if (argExeName == null)