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
CommunityToolkit.Maui has a transitive dependency to Microsoft.Maui.Controls.Compatibility NuGet package. It means that consumers of CommunityToolkit.Maui now get the reference whether they want it or not.
Cursory test seems to show that there's very little code depending on the compatibility package (IVisualNativeElementRenderer usage in TouchBehavior.macios.cs) and Color.ToAndroid() extension method. The ToAndroid method usage can be replaced with ToPlatform extension method in the base MAUI package. Usage of IVisualNativeElementRenderer may be a bit more difficult to get rid of but probably solvable by getting rid of that compatibility kludge, using reflection, or rewriting it to detect the situation from the view hierarchy.
Expected Behavior
No dependency on Microsoft.Maui.Controls.Compatibility.
Steps To Reproduce
Add CommunityToolkit.Maui NuGet dependency.
Observe that Microsoft.Maui.Controls.Compatibility gets transitively included.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
CommunityToolkit.Maui has a transitive dependency to
Microsoft.Maui.Controls.Compatibility
NuGet package. It means that consumers ofCommunityToolkit.Maui
now get the reference whether they want it or not.Cursory test seems to show that there's very little code depending on the compatibility package (
IVisualNativeElementRenderer
usage inTouchBehavior.macios.cs
) andColor.ToAndroid()
extension method. TheToAndroid
method usage can be replaced withToPlatform
extension method in the base MAUI package. Usage ofIVisualNativeElementRenderer
may be a bit more difficult to get rid of but probably solvable by getting rid of that compatibility kludge, using reflection, or rewriting it to detect the situation from the view hierarchy.Expected Behavior
No dependency on
Microsoft.Maui.Controls.Compatibility
.Steps To Reproduce
CommunityToolkit.Maui
NuGet dependency.Microsoft.Maui.Controls.Compatibility
gets transitively included.Link to public reproduction project repository
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: