diff --git a/src/Generator/Generators/CSharp/CSharpSources.cs b/src/Generator/Generators/CSharp/CSharpSources.cs index ee7531e3..f4246f89 100644 --- a/src/Generator/Generators/CSharp/CSharpSources.cs +++ b/src/Generator/Generators/CSharp/CSharpSources.cs @@ -629,7 +629,7 @@ namespace CppSharp.Generators.CSharp foreach (var method in @class.Methods) { - if (ASTUtils.CheckIgnoreMethod(method)) + if (!method.IsGenerated || ASTUtils.CheckIgnoreMethod(method)) continue; if (method.IsConstructor) @@ -2755,6 +2755,13 @@ namespace CppSharp.Generators.CSharp return; } + // ignored functions may get here from interfaces for secondary bases + if (function.Ignore) + { + WriteLine("throw new System.MissingMethodException(\"No C++ symbol to call.\");"); + return; + } + var retType = function.OriginalReturnType; if (returnType.Type == null) returnType = retType;