What does xaml compilation do?

Will.ItraxWill.Itrax CAMember ✭✭✭

I read that it makes things faster ( https://developer.xamarin.com/guides/xamarin-forms/xaml/xamlc/
and converts it to IL.
What it does not seem to do is check that the variables used in XAML are actually in the code. I had the wrong case on a variable and it took quite some time to find the problem. However, just in case I have not set up XAML compilation correctly, how can I tell that it is actually happening?

Best Answer


  • HunumanHunuman GBMember ✭✭✭✭
    edited April 2017

    Hi @Will.ltrax

    My understanding is that only certain elements of the XAML are "compiled", but many of the the property values you define in the XAML are set at runtime.


  • PhilippSumiPhilippSumi USMember ✭✭✭

    Yeah, my initial response to that forum question would be: break your stuff ;)
    I basically gave up on it after being able to compile, but getting completely nondescript exceptions at runtime after switching on XamlC - I had literally nothing to work on. @DavidOrtinau, is there an improvement to this on the horizon?

  • Will.ItraxWill.Itrax CAMember ✭✭✭

    @DavidOrtinau Thanks. Following your guidance, I did some testing. On occasion I have left some spurious characters outside of tags. So I tried that and got errors upon compiling. Those used to be tough to find. Thanks.

    I added some random characters to a variable that I was binding to and got no error message - as you said.

Sign In or Register to comment.