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

Wei Wen 1,096 Reputation points
2022-10-27T19:53:37.767+00:00

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?

.NET MAUI
.NET MAUI
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
    2022-10-31T14:09:15.737+00:00

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