mparlak / Flee

Fast Lightweight Expression Evaluator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System.PlatformNotSupportedException in .Net Standard 2.0

andeq opened this issue · comments

commented

We are currently developing a UWP App which should use Flee for Expression Evaluation. Unfortunately in the Release Build we get a System.PlatformNotSupportedException.

System.PlatformNotSupportedException: 'Dynamic code generation is not supported on this platform.'

at System.Reflection.Emit.DynamicMethod..ctor(String name, Type returnType, Type[] parameterTypes) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Reflection\Emit\ReflectionEmitThrower.cs:line 11 at Flee.InternalTypes.Expression1.CreateDynamicMethod()
at Flee.InternalTypes.Expression1.Compile(String expression, ExpressionOptions options) at Flee.InternalTypes.Expression1..ctor(String expression, ExpressionContext context, Boolean isGeneric)`

Flee should support .Net Standard 2.0, but apparently DynamicMethod isn`t supported in .Net Standard 2.0: DynamicMethod Class

How can this be possible? How can we use Flee with .Net Standard 2.0 and UWP?

Library need to use multi-targeting and add net461, netcoreapp2.0, uap10.0 or maybe others to list of targets. Docs

Library need to use multi-targeting and add net461, netcoreapp2.0, uap10.0 or maybe others to list of targets. Docs

How would this resolve the issue of UWP not supporting dynamic code generation? Cannot use Reflection.Emit, which is pretty much all Flee does. It generates dynamic code.