我想在Monotouch上試驗一下Jint,雖然Jint-Mono項目(不是monotouch版本,但單聲道)在我的mac上工作,但我無法使其工作爲iPhone。我只是裝箱這個類:試圖在Monotouch上使用Jint引擎
namespace iPhoneTests
{
public class JintObject
{
public JintObject()
{
var jintEngine = new JintEngine();
jintEngine.Run
(
@"Console.WriteLine('Hello World')"
);
}
}
}
,每當我試圖調用JintObject方法,我得到一個異常錯誤:
Unhandled Exception: System.TypeLoadException: A type load exception has occurred.
at Jint.Marshaller.WrapMethod (System.Reflection.MethodInfo info, Boolean passGlobal) [0x00000] in <filename unknown>:0
at Jint.Native.NativeMethod..ctor (System.Reflection.MethodInfo info, Jint.Native.JsObject prototype, IGlobal global) [0x00000] in <filename unknown>:0
at Jint.Native.NativeConstructor.ReflectOverload (ICollection`1 methods) [0x00000] in <filename unknown>:0
我在做什麼錯?
請用新的版本,這是一個PCL https://github.com/嘗試sebastienros/jint https://www.nuget.org/packages/Jint公告:https://jint.codeplex.com/discussions/536901 – 2014-03-03 06:06:00