Forum Visual Studio

Some questions about Xamarin and Debugging

AviadKataniAviadKatani USMember ✭✭

I've started to learn how to develope on Xamarin (came from Android Studio for Cross Platform) and I struggle with few things:
1. Most of the courses out there about Xamarin aren't updated to Visual Studio 2017.
2. Today I have made some on MainPage.xaml -- My application kept crashing on start and the logcat on Xamarin didn't quite help to catch the problem. After running the emulator with Android Studio open, I've got this error: "Type OnPlatform not found in xmlns"...
After searching a bit in google I've found out this error has something to do with TypeArguments. In one Key I wrote "TypeArgument" without the 's'. The App kept crashing. Other problem was that instead of BasedOn="{StaticResource LabelStyleSmall}" I wrote BasedOn="{StaticResource LabelStyleSml}".
The question is: is it makes sense that I need to go all through that because the IDE didn't alert with Error? or at least auto-correct to a existed StaticResource while typing?

Thanks for those who bother to read & help :)


  • N_BauaN_Baua INMember ✭✭✭✭✭

    Hi @AviadKatani ,

    No issues man, I know, if its been a while for you with this, it gets really annoying.

    To help you with XAML issues. add the following code in your app init. Typically at assembly/namespace level

    [assembly: XamlCompilation (XamlCompilationOptions.Compile)]

    This will prompt for any issues with XAML much before they hit you.
    Read here for more : >

    Hope this helps.

    N Baua

Sign In or Register to comment.