Browse Source

Fix debug symbols and local references

Bepis 6 years ago
parent
commit
fa12e0402e
2 changed files with 4 additions and 6 deletions
  1. 2 0
      BepInEx/BepInEx.csproj
  2. 2 6
      BepInEx/Bootstrap/Preloader.cs

+ 2 - 0
BepInEx/BepInEx.csproj

@@ -34,6 +34,7 @@
     <PlatformTarget>AnyCPU</PlatformTarget>
     <ErrorReport>prompt</ErrorReport>
     <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <DebugSymbols>false</DebugSymbols>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="0Harmony">
@@ -45,6 +46,7 @@
     <Reference Include="System" />
     <Reference Include="UnityEngine">
       <HintPath>..\lib\UnityEngine.dll</HintPath>
+      <Private>False</Private>
     </Reference>
   </ItemGroup>
   <ItemGroup>

+ 2 - 6
BepInEx/Bootstrap/Preloader.cs

@@ -90,12 +90,8 @@ namespace BepInEx.Bootstrap
 							foreach (KeyValuePair<AssemblyPatcherDelegate, IEnumerable<string>> kv in GetPatcherMethods(assembly))
 								sortedPatchers.Add(assembly.GetName().Name, kv);
 						}
-						catch (BadImageFormatException)
-						{
-						} //unmanaged DLL
-						catch (ReflectionTypeLoadException)
-						{
-						} //invalid references
+						catch (BadImageFormatException) { } //unmanaged DLL
+						catch (ReflectionTypeLoadException) { } //invalid references
 
 					foreach (KeyValuePair<string, KeyValuePair<AssemblyPatcherDelegate, IEnumerable<string>>> kv in sortedPatchers)
 						AddPatcher(kv.Value.Value, kv.Value.Key);