I have created a .Net C# Android Binding Library. I want to reference that project to only to android references(net6.0-android). When I'm trying to add it is referencing to net6.0, net6.0-android, net6.0-ios, which is not correct as the library is android C# library. How to add the android C# library to MAUI net6.0-android only.
android library should be referenced to MAUI net6.0-android only.
It is simpler than it looks, but there is no way (or at least I have not found it) to do it visually or with a wizard.
Just add the reference, then download the project and edit the project file.
Find the ItemGroup
with the references you want unique to a platform(for example android) and add this:
<ItemGroup Condition="$(TargetFramework.Contains('-android')) != false ">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With