Browse Source

Remove specific cecil version preprocessors

Bepis 6 years ago
parent
commit
b86ba93d86
2 changed files with 1 additions and 9 deletions
  1. 0 4
      BepInEx/Bootstrap/AssemblyPatcher.cs
  2. 1 5
      BepInEx/Bootstrap/Preloader.cs

+ 0 - 4
BepInEx/Bootstrap/AssemblyPatcher.cs

@@ -53,9 +53,7 @@ namespace BepInEx.Bootstrap
                 if (assembly.Name.Name == "System"
                     || assembly.Name.Name == "mscorlib") //mscorlib is already loaded into the appdomain so it can't be patched
                 {
-#if CECIL_10
                     assembly.Dispose();
-#endif
                     continue;
                 }
 
@@ -119,9 +117,7 @@ namespace BepInEx.Bootstrap
 			    }
 
 			    Load(assembly);
-#if CECIL_10
 			    assembly.Dispose();
-#endif
 			}
 			
 	        //run all finalizers

+ 1 - 5
BepInEx/Bootstrap/Preloader.cs

@@ -209,12 +209,8 @@ namespace BepInEx.Bootstrap
 				? Config.GetEntry("entrypoint-method", section: "Preloader")
 				: "";
 			bool isCctor = entrypointMethod.IsNullOrWhiteSpace() || entrypointMethod == ".cctor";
-
-#if CECIL_10
+			
 			using (var injected = AssemblyDefinition.ReadAssembly(Paths.BepInExAssemblyPath))
-#elif CECIL_9
-            AssemblyDefinition injected = AssemblyDefinition.ReadAssembly(BepInExAssemblyPath);
-#endif
 			{
 				var originalInjectMethod = injected.MainModule.Types.First(x => x.Name == "Chainloader").Methods
 					.First(x => x.Name == "Initialize");