Forms Application with native views crashes after updating to XF 2.4.0.18342

DavidS67DavidS67 USMember ✭✭

Hello !

I am using native view in my XF projects. Everything was working well with XF 2.3.4.247. Now I am updating my solution (PLC, Android, and iOS) with XF 2.4.0.18342 and when i try to navigate to a view containing native views, i keep having this exception thrown:

10-26 17:56:12.351 E/mono-rt (28353): [ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Sequence contains no matching element 10-26 17:56:12.351 E/mono-rt (28353): at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x00011] in <a86d4e79c59b43fa837a1ec26cf8486e>:0 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.TryAddToProperty (System.Object element, System.String localName, System.Object value, System.Xml.IXmlLineInfo lineInfo, Xamarin.Forms.Xaml.Internals.XamlServiceProvider serviceProvider, System.Exception& exception) [0x0005d] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:510 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.SetPropertyValue (System.Object xamlelement, Xamarin.Forms.Xaml.XmlName propertyName, System.Object value, System.Object rootElement, Xamarin.Forms.Xaml.INode node, Xamarin.Forms.Xaml.HydratationContext context, System.Xml.IXmlLineInfo lineInfo) [0x000a2] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:334 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.Visit (Xamarin.Forms.Xaml.ValueNode node, Xamarin.Forms.Xaml.INode parentNode) [0x00070] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:58 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.ValueNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00000] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\XamlNode.cs:86 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00043] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\XamlNode.cs:143 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00078] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\XamlNode.cs:145 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00078] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\XamlNode.cs:145 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.RootNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00078] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\XamlNode.cs:203 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.XamlLoader.Visit (Xamarin.Forms.Xaml.RootNode rootnode, Xamarin.Forms.Xaml.HydratationContext visitorContext) [0x0007b] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\XamlLoader.cs:141 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.String xaml) [0x0004b] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\XamlLoader.cs:89 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.Type callingType) [0x0002f] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\XamlLoader.cs:68 10-26 17:56:12.351 E/mono-rt (28353): at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[TXaml] (TXaml view, System.Type callingType) [0x00000] in C:\agent\_work\3\s\Xamarin.Forms.Xaml\ViewExtensions.cs:36 Thread finished: #2 10-26 17:56:12.351 E/mono-rt (28353): at ble.basic.Core.Views.NativeView.InitializeComponent () [0x00001] in C:\BLETest\ble\ble\apps\basic\obj\Debug\ble.basic.Core.Views.NativeView.xaml.g.cs:28 10-26 17:56:12.351 E/mono-rt (28353): at ble.basic.Core.Views.NativeView..ctor () [0x00008] in C:\BLETest\ble\ble\apps\basic\Views\NativeView.xaml.cs:15 10-26 17:56:12.351 E/mono-rt (28353): at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) 10-26 17:56:12.351 E/mono-rt (28353): at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <0d8f81f220f5408ba95d694af0944960>:0 10-26 17:56:12.351 E/mono-rt (28353): --- End of inner exception stack trace ---

I have changed nothing except the XF nuget package version.

Any idea why this exception appears ?

Sign In or Register to comment.