After upgrading to Xamarin 5, UWP Display Alert throws exception.

Konstantinos Koumpanakis 1 Reputation point

Hello everyone,

Me and my team have just migrated our cross-platform XF 4 project to XF5.
The only issue that we have encountered thus far is the following:
Our UWP App was throwing an unhandled App.Xaml exception when navigating to a different page for no apparent reason and after some search, installing the nugget Microsoft.UI.Xaml explicitly fixed that issue, even though that nugget package is supposed to be installed along with XF5 nugget.
But right now a new issue has emerged. When calling the 'await Application.Current.MainPage.DisplayAlert(szTitle, szMessage, btnOk, btnCancel);' from the UI thread the alert gets displayed properly but when I click on one of its buttons Ι get an unhandled exception "No installed components were detected. The property path '(controls:AnimatedIcon.State)' could not be resolved for a Setter." where controls is defined as xmlns:controls="using:Microsoft.UI.Xaml.Controls"
Could you please help me find out what is going wrong? As far as I know the DisplayAlert() is handled by Xamarin.Forms.

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,014 questions
Universal Windows Platform (UWP)
{count} votes