diff --git a/BepInEx/Utility.cs b/BepInEx/Utility.cs index 67eaa1c..b4f69f0 100644 --- a/BepInEx/Utility.cs +++ b/BepInEx/Utility.cs @@ -22,13 +22,18 @@ namespace BepInEx { try { - var m = new DynamicMethod("SRE_Test", null, null); CLRSupportsDynamicAssemblies = true; + // ReSharper disable once AssignNullToNotNullAttribute + var m = new CustomAttributeBuilder(null, new object[0]); } catch (PlatformNotSupportedException) { CLRSupportsDynamicAssemblies = false; } + catch (ArgumentNullException) + { + // Suppress ArgumentNullException + } } ///