Forum Xamarin.Forms

Xaml Compilation results in MissingMethodException.

DancaDanca SEMember

Hello!

I did recently discover Xaml Compilation when looking for ways to improve the performance of my xamarin forms app. However, when I try too activate it by adding the assembly line:

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]

a MissingMethodException is thrown:

" Method 'ImageSourceConverter.ConvertFromInvariantString' not found. "

The app crashes and throws the exception above on the InitializeComponent method on the first page of the app.

Additional information that might be helpfull is that the app builds and runs as long as I activate the Xaml Compilation on class level.

How do I enabled the Xaml Compilation on assembly level without getting these MissingMethodExceptions?

Thanks in advance!

Answers

  • CedMCedM FRMember

    Hello Xamarin World !
    The same thing for me. I have ran across the web whithout find an answer, now I ask the community.
    Please, be kind with my language. It must be better next time... ;)

  • CedMCedM FRMember

    Danca, Have you tried to put the assembly line under namespace... In platform specific projects ?
    My issue was solved by doing this :D

  • DancaDanca SEMember

    Hello CedM and thank you for answering. The application builds and runs fine when I place the assembly line inside the namespace. However I don't think that XamlCompilation is in fact turned on. And xamarin studio of course gives me a warning saying that "assembly" is not placed correctly.

    Is there a way to confirm that XamlCompilation is turned on?

    Thanks again.

Sign In or Register to comment.