System.InvalidCastException:Object must implement IConvertible

TioWidowTioWidow BRMember

Hello, Could help me with this problem?

My code worked well on the Xamarin Studio, then I converted the project to Visual Studio 2016.

When to build the code to Visual Studio does not generate any error, the application opens normally and when in DEBUG MODE on screen change in the application the following error is generated:

System.InvalidCastException: Object must implement IConvertible.

                var mainStack = new StackLayout {
                    Spacing = 5,
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    Orientation = StackOrientation.Vertical,
                    Children = { map }//,  btnNearbyLocation }
                };

                Content = mainStack;/// <<Line of Error

Answers

  • MihaMarkicMihaMarkic SI ✭✭✭✭

    I'm having the same. The core problem is that debugger ignores "Only my code" and traps handled exceptions.

Sign In or Register to comment.