[Xamarin Forms] build error: Unable to cast object of type 'Xamarin.Forms.Xaml.ElementNode' to type 'Xamarin.Forms.Xaml.ValueNode'
Xaml build error
For one of my Xamarin project, I just had this build error:This error was related to my XAML code:
Unable to cast object of type 'Xamarin.Forms.Xaml.ElementNode' to type 'Xamarin.Forms.Xaml.ValueNode'
After searching for a long 'moment', I just didn't understand what happened...
My investigation (this process can help you :p)
So I decided to remove a large part of my xaml code and then re-add it little by little. Each step I tried to compile to see when error occurs.So In my case, I determined that the piece of code that was going wrong was the following:
Ok, it was my mistake but in the code editor, Visual Studio didn't tell me anything.
I was trying to bind an event (I though it was a property) to a DateTime property... What is not possible.
Hope this helps someone to save a few minutes :)
This did help me with a similar error with a ListView. I was binding to ItemSelected instead of SelectedItem.
ReplyDeleteThanks for this!
Glad it helped you ! I hope you didn't lose to much time with this :p
DeleteThanks for this. This helped me to figure out my bug as well.
ReplyDeleteI got the same error and I saw this. It worked! thanks a lot! :P
ReplyDeleteThanks for this!
ReplyDeleteYou just saved me a bunch of time. I don't know how to thank you!
ReplyDelete