You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1334066
In traditional Xamarin.Android, a File -> New binding project emits
the warning:
BINDINGSGENERATOR warning BG8601: No '<package>' elements found.
This happens until you add a Java library to actually bind.
The warning doesn't happen in .NET 6 due to the `Condition`:
<Target Name="_SetAndroidGenerateManagedBindings"
Condition=" '$(UsingAndroidNETSdk)' != 'true' Or '@(InputJar->Count())' != '0' Or '@(EmbeddedJar->Count())' != '0' Or '@(LibraryProjectZip->Count())' != '0' ">
<PropertyGroup>
<!-- Used throughout to determine if C# binding-related targets should skip -->
<_AndroidGenerateManagedBindings>true</_AndroidGenerateManagedBindings>
</PropertyGroup>
</Target>
The `$(UsingAndroidNETSdk)` check makes the value always true in
traditional Xamarin.Android. I think we can just remove this check, as
the `Condition` has been working well in .NET 6.
I added a new test for this scenario. The warning is gone now.
0 commit comments