Problems with .Net Native compiling

3 posts, 0 answers
  1. Gabor
    Gabor avatar
    3 posts
    Member since:
    Feb 2014

    Posted 13 Oct 2015 Link to this post

    Our current project requires Telerik controls for displaying statistics (mainly using the Charts and Gauges).

     

    For this, initially, I used the Win8.1 Universal SDK, but it had a huge issue - the Telerik.Core.BindingExpressionHelper uses reflection, and does not define itself as Dynamic, for the .Net Native compiler.

     So I installed and selected the UWP SDK, which is supposed to work just fine. However I get the same exception:

    Exception thrown: 'System.Reflection.MissingRuntimeArtifactException' in System.Private.Reflection.Core.dll

    Additional information: MakeGenericMethod_NoMetadata, Telerik.Core.BindingExpressionHelper.ToUntypedFunc<TestApp.Models.Data,System.Double>(System.Func<TestApp.Models.Data,System.Double>). For more information, visit http://go.microsoft.com/fwlink/?LinkId=623485

     

     

    In theory if Telerik released a truly release build of their libraries, it should already be .Net Native compiled and checked for such errors.

  2. Gabor
    Gabor avatar
    3 posts
    Member since:
    Feb 2014

    Posted 14 Oct 2015 in reply to Gabor Link to this post

    Telerik Support directed us here:

    http://docs.telerik.com/windows-universal/common/troubleshooting/appthrowsexceptioninreleasemode

     

    However, even after adding the proper entries (see below), it fails with the same exception. I also made a note that the "TestApp.Models.Data" class mentioned does NOT exist in our project.

  3. DevCraft banner
  4. Gabor
    Gabor avatar
    3 posts
    Member since:
    Feb 2014

    Posted 14 Oct 2015 in reply to Gabor Link to this post

    Okay, the issue was that the documentation is missing one key point - defining not WHAT to work on, but HOW.

     For it to work properly, add the Dynamic tag to each MethodInstantiate, with the Required value:

     

    <Type Name="Telerik.Core.BindingExpressionHelper">
        <MethodInstantiation Name="ToUntypedFunc" Arguments="TestApp.Models.Data,System.Double" Dynamic="Required"/>
    </Type>

Back to Top