diff --git a/BepInEx.AssemblyPublicizer/AssemblyPublicizer.cs b/BepInEx.AssemblyPublicizer/AssemblyPublicizer.cs index 3558a6c..b7c33bc 100644 --- a/BepInEx.AssemblyPublicizer/AssemblyPublicizer.cs +++ b/BepInEx.AssemblyPublicizer/AssemblyPublicizer.cs @@ -118,6 +118,18 @@ private static void Publicize(MethodDefinition methodDefinition, OriginalAttribu if (methodDefinition.IsCompilerControlled) return; + // Ignore explicit interface implementations because you can't call them directly anyway and it confuses IDEs + if (methodDefinition is { IsVirtual: true, IsFinal: true, DeclaringType: not null }) + { + foreach (var implementation in methodDefinition.DeclaringType.MethodImplementations) + { + if (implementation.Body == methodDefinition) + { + return; + } + } + } + if (!methodDefinition.IsPublic) { if (!ignoreCompilerGeneratedCheck && !options.PublicizeCompilerGenerated && methodDefinition.IsCompilerGenerated())