diff --git a/.gitignore b/.gitignore
index 5754fe49..7ed0fc89 100644
--- a/.gitignore
+++ b/.gitignore
@@ -204,3 +204,4 @@ ModelManifest.xml
/Harmony/Documentation/api/*.html
/Harmony/Documentation/api/*.yml
/Harmony/Documentation/Documentation.dll
+.idea/
diff --git a/.idea/.idea.Harmony/.idea/.gitignore b/.idea/.idea.Harmony/.idea/.gitignore
deleted file mode 100644
index a7238f99..00000000
--- a/.idea/.idea.Harmony/.idea/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Rider ignored files
-/contentModel.xml
-/.idea.Harmony.iml
-/modules.xml
-/projectSettingsUpdater.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
-# Editor-based HTTP Client requests
-/httpRequests/
diff --git a/.idea/.idea.Harmony/.idea/.name b/.idea/.idea.Harmony/.idea/.name
deleted file mode 100644
index f56b32f7..00000000
--- a/.idea/.idea.Harmony/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-Harmony
\ No newline at end of file
diff --git a/.idea/.idea.Harmony/.idea/CakeRider.xml b/.idea/.idea.Harmony/.idea/CakeRider.xml
deleted file mode 100644
index 5f6d6687..00000000
--- a/.idea/.idea.Harmony/.idea/CakeRider.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Harmony/.idea/codeStyles/codeStyleConfig.xml b/.idea/.idea.Harmony/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a17..00000000
--- a/.idea/.idea.Harmony/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Harmony/.idea/discord.xml b/.idea/.idea.Harmony/.idea/discord.xml
deleted file mode 100644
index cd711a0e..00000000
--- a/.idea/.idea.Harmony/.idea/discord.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Harmony/.idea/indexLayout.xml b/.idea/.idea.Harmony/.idea/indexLayout.xml
deleted file mode 100644
index 7b08163c..00000000
--- a/.idea/.idea.Harmony/.idea/indexLayout.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Harmony/.idea/misc.xml b/.idea/.idea.Harmony/.idea/misc.xml
deleted file mode 100644
index 28a804d8..00000000
--- a/.idea/.idea.Harmony/.idea/misc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Harmony/.idea/vcs.xml b/.idea/.idea.Harmony/.idea/vcs.xml
deleted file mode 100644
index 13df3bb0..00000000
--- a/.idea/.idea.Harmony/.idea/vcs.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Harmony/Harmony.csproj b/Harmony/Harmony.csproj
index 6dfe4f8e..d58d7b7a 100644
--- a/Harmony/Harmony.csproj
+++ b/Harmony/Harmony.csproj
@@ -11,7 +11,7 @@
Andreas Pardeike, Geoffrey Horsington, ManlyMarco et al.
0Harmony
true
- 2.10.2
+ 2.11.0
LICENSE
https://github.com/BepInEx/HarmonyX
false
@@ -46,9 +46,9 @@
-
-
-
+
+
+
@@ -66,13 +66,14 @@
-
+
-
+
-
+
+
@@ -80,20 +81,20 @@
$(MSBuildThisFileDirectory)bin\$(Configuration)
-
+
-
+
-
+
-
+
-
+
diff --git a/Harmony/Internal/PatchFunctions.cs b/Harmony/Internal/PatchFunctions.cs
index 2af2a308..6bde474f 100644
--- a/Harmony/Internal/PatchFunctions.cs
+++ b/Harmony/Internal/PatchFunctions.cs
@@ -146,7 +146,7 @@ static void PrintInfo(StringBuilder sb, ICollection methods, string
// TODO: Handle new debugType
Logger.Log(Logger.LogChannel.IL,
() => $"Generated reverse patcher ({ctx.Method.FullName}):\n{ctx.Body.ToILDasmString()}", debug);
- }, new ILHookConfig { ManualApply = true });
+ }, applyByDefault: false);
try
{
@@ -157,7 +157,7 @@ static void PrintInfo(StringBuilder sb, ICollection methods, string
throw HarmonyException.Create(ex, patchBody);
}
- var replacement = hook.GetCurrentTarget() as MethodInfo;
+ var replacement = hook.Method as MethodInfo;
PatchTools.RememberObject(standin.method, replacement);
return replacement;
}
diff --git a/Harmony/Internal/PatchTools.cs b/Harmony/Internal/PatchTools.cs
index d8c4f396..3905e29b 100644
--- a/Harmony/Internal/PatchTools.cs
+++ b/Harmony/Internal/PatchTools.cs
@@ -12,7 +12,7 @@ internal static class PatchTools
// https://stackoverflow.com/a/33153868
// ThreadStatic has pitfalls (see RememberObject below), but since we must support net35, it's the best available option.
[ThreadStatic]
- static Dictionary