What is the reason for this exception: "Unable to find IAnimationManager for 'Microsoft.Maui.Controls.Shapes.Path'. Arg_ParamName_Name"

Joris Zwaenepoel (I-solv-IT) 0 Reputation points
2024-07-08T14:35:31.7966667+00:00

I'm getting the error

System.ArgumentException: 'Unable to find IAnimationManager for 'Microsoft.Maui.Controls.Shapes.Path'. Arg_ParamName_Name'

When starting my MAUI application on my development machine. It started a few hours ago, but the exact same code ran successfully just a few hours earlier.

The same code runs without errors on at least 3 other computers.

I already restarted my computer, updated Visual Studio to the latest version (17.10.3), made a new clone of the repo, but it doesn't change anything. I keep getting this error.

public partial class CuseContentPage : ContentPage

{

public CuseContentPage()

{

InitializeComponent();

}

private ViewModelBase _vm;

protected override void OnBindingContextChanged()

{

base.OnBindingContextChanged(); <-- the exception occurs on this line of code

_vm = ((ViewModelBase)this.BindingContext);

}

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,487 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 54,316 Reputation points
    2024-07-08T15:00:45.5366667+00:00

    While I cannot explain why it worked before and not now my guess is that you made a change in your XAML and it is now breaking when binding data. Take a look at the entire callstack when the exception occurs and it should quickly narrow it down.

    The exception is pretty self explanatory so getting the stack trace should identify where the problem is. The error is that the argument called name being passed to the code that is failing cannot find the IAnimationManager object to use. Ultimately the stack trace should indicate where this is occurring at. My gut instinct is that either the data binding is wrong or it is null and therefore cannot find what it is looking for. But that is just a guess at this point.

    Interestingly there was a closed issue on Github for MAUI about something very similar a while back. You might also look to see if that sheds light on your particular case.

    Since you're using a repo you might also consider reverting back to the version of the branch when it was working last and then slowly add back the commits until it breaks again.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.