mparlak / Flee

Fast Lightweight Expression Evaluator
607 stars 119 forks source link

"Type 'DefaultExpressionOwner' is not accessible to the expression" when using .NET native tool chain #90

Open inkmike opened 3 years ago

inkmike commented 3 years ago

This exception occurs on a UWP project, only when "Compile with .NET native tool chain" is ticked in build configuration.

Exception occurs on the following statement (I assume that the actual expression string itself is not relevant, but included it anyway):

expressionContext.CompileDynamic("calc_days(StartDate_1-EndDate_1)");

Thoughts? Unfortunately .NET native tool chain is required for publishing apps to the microsoft store, so I'm at a loss at the moment.

inkmike commented 3 years ago

After integrating with the non-compiled version, I made an edit to the DefaultExpressionOwner class to make it public, which allowed me to get past that error (no idea why this would only be a problem on .NET native tool chain though).

I then received the following error: Dynamic code generation is not supported on this platform.

Oh dear. So I guess this library simply doesn't support UWP then :( If there is a known workaround then that would be great to know. Otherwise feel free to just close this issue.

hunkydoryrepair commented 2 years ago

Microsoft no longer requires UWP to go onto the Microsoft Store if I heard correctly.