gpt4 book ai didi

c# - IronPython,单击一次,.NET 2.0 错误 - 想法?

转载 作者:行者123 更新时间:2023-11-30 21:24:56 28 4
gpt4 key购买 nike

我正在尝试推出一个测试应用程序来测试右击 Click Once Smart Client 应用程序的可行性,该应用程序还使用可通过嵌入 IronPython 进行自定义的规则引擎。

到目前为止,除我以外的所有用户在调用脚本引擎时都会遇到此错误(如下)。

我是否需要做一些特殊的事情来强制部署 IronPython 和脚本程序集?我认为那是自动的,因为它们在我的项目中被引用了。这在 .NET 2.0 中不可行吗?

想法?

************** Exception Text **************System.MissingMethodException: Method not found: 'Void System.Reflection.Emit.DynamicMethod..ctor(System.String, System.Type, System.Type[], Boolean)'.   at Microsoft.Scripting.Utils.Helpers.CreateDynamicMethod(String name, Type returnType, Type[] parameterTypes)   at Microsoft.Linq.Expressions.Compiler.Snippets.CreateDynamicMethod(String name, Type returnType, Type[] parameterTypes)   at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CreateDynamicLambdaCompiler(CompilerScope scope, String methodName, Type returnType, IList`1 paramTypes, IList`1 paramNames, Boolean closure, Boolean emitDebugSymbols, Boolean forceDynamic)   at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CompileLambda(LambdaExpression lambda, Type delegateType, Boolean emitDebugSymbols, Boolean forceDynamic, MethodInfo& method)   at Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CompileLambda[T](LambdaExpression lambda, Boolean emitDebugSymbols)   at Microsoft.Linq.Expressions.LambdaExpression.Compile[T](Boolean emitDebugSymbols)   at Microsoft.Scripting.Runtime.OptimizedScriptCode.InvokeTarget(LambdaExpression code, Scope scope)   at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink)   at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)   at UAP.UI.Form1.button1_Click(Object sender, EventArgs e)   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ButtonBase.WndProc(Message& m)   at System.Windows.Forms.Button.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

最佳答案

IronPython 需要 .NET 2.0SP1 或更高版本才能运行。此异常是由于 SP1 中添加的过载而发生的。

关于c# - IronPython,单击一次,.NET 2.0 错误 - 想法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/922681/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com