Why none of the binding library's classes' methods are accessible in .NET MAUI

Wei Wen 1,096 Reputation points

I have a .NET MAUI app that needs to use custom native Android and iOS libraries. I was able to successfully create Android binding library with generated .cs files in BindingLib/obj/debug/net6.0-android/generated/src. However, I can only access interfaces of the classes. None of the methods can be accessed. I took a look at the generated .cs files. They all have this: DoNotGenerateAcw=true. I assume that since Android Callable Wrapper is not generated, none of the methods can be called? If so, how can I set DoNotGenerateAcw to false? Is there some parameter that I can set in csproj to achieve this?

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,058 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Fabio Ruscelli 1 Reputation point

    i've segnalated the same problem in june.
    the feedback bot response had me speechless.