0

I am trying to use handlebars with C# in universal windows platform (UWP) using Handlebars.Net in this GitHub link (https://github.com/Handlebars-Net/Handlebars.Net)

I used simple code used in the usage section in the link above and even though it didn't work always stop at handlebars.compile() function and throws error.

My code is a very basic simple one just when I press a button in the application, I enter debug mode to see the result but I got this exception message.

This is the error message.

error message

full exception error

and this is the code I used.

    try
    {
        string source = "{{title}} and This Is body : {{body}}";

        var template = Handlebars.Compile(source);

        var data = new
        {
            title = "My new post",
            body = "This is my first post!"
        };

        var result = template(data);

    }
    catch (Exception ex)
    {
        throw new Exception(ex.Message);
    }

I tried installing Linq express and Linq itself but nothing changed.

1 Answer 1

0

Handlebars.Net uses Expression Trees to compile templates. MissingMethodException means that platform you're trying to compile the template on does not support required Expression Trees features. It's known issue on iOS. I may assume that the same might be true for UWP.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks a lot, i decide to make canvas drawing fixed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.