C# IronPython,单击一次.NET2.0错误-思考?

C# IronPython,单击一次.NET2.0错误-思考?,c#,.net,scripting,ironpython,C#,.net,Scripting,Ironpython,我正在尝试推出一个测试应用程序,以测试纠正一个点击一次的智能客户端应用程序的可行性,该应用程序还使用了一个可通过嵌入IronPython定制的规则引擎 到目前为止,除了我以外的所有用户在调用脚本引擎时都会出现此错误(见下文) 我是否需要做一些特殊的事情来强制部署IronPython和脚本程序集?我认为这将是自动的,因为它们在我的项目中被引用。 这在.NET2.0中不可行吗 想法 ************** Exception Text ************** System.Missing

我正在尝试推出一个测试应用程序,以测试纠正一个点击一次的智能客户端应用程序的可行性,该应用程序还使用了一个可通过嵌入IronPython定制的规则引擎

到目前为止,除了我以外的所有用户在调用脚本引擎时都会出现此错误(见下文)

我是否需要做一些特殊的事情来强制部署IronPython和脚本程序集?我认为这将是自动的,因为它们在我的项目中被引用。 这在.NET2.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) **************例外文本************** System.MissingMethodException:找不到方法:“Void System.Reflection.Emit.DynamicMethod..ctor(System.String,System.Type,System.Type[],Boolean)”。 位于Microsoft.Scripting.Utils.Helpers.CreateDynamicMethod(字符串名称,类型returnType,类型[]参数类型) 位于Microsoft.Linq.Expressions.Compiler.Snippets.CreateDynamicMethod(字符串名称、类型returnType、类型[]参数类型) 在Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CreateDynamicClambDaCompiler(编译器作用域、字符串方法名称、类型returnType、IList`1参数类型、IList`1参数名称、布尔闭包、布尔符号、布尔forceDynamic) 在Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CompileLambda(LambdaExpression lambda,类型delegateType,布尔emitDebugSymbols,布尔forceDynamic,MethodInfo&method) 位于Microsoft.Linq.Expressions.Compiler.LambdaCompiler.CompileLambda[T](LambdaExpression lambda,布尔符号) 在Microsoft.Linq.Expressions.LambdaExpression.Compile[T](布尔符号) 在Microsoft.Scripting.Runtime.OptimizedScriptCode.InvokeTarget(LambdaExpression代码,作用域) 在Microsoft.Scripting.SourceUnit.Execute(作用域范围,ErrorSink ErrorSink) 位于Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope范围) 在UAP.UI.Form1.button1\u点击(对象发送者,事件参数) 在System.Windows.Forms.Control.OnClick(EventArgs e)中 在System.Windows.Forms.Button.OnClick(EventArgs e)中 在System.Windows.Forms.Button.OnMouseUp(MouseEventArgs-mevent)上 在System.Windows.Forms.Control.WmMouseUp(Message&m、MouseButtons按钮、Int32单击) 位于System.Windows.Forms.Control.WndProc(Message&m) 位于System.Windows.Forms.ButtonBase.WndProc(Message&m) 在System.Windows.Forms.Button.WndProc(Message&m)中 在System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&m)中 在System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&m)中 在System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd、Int32 msg、IntPtr wparam、IntPtr lparam)中
如果右键单击项目并转到
属性
,则会有一个
发布
选项卡,可用于指定应用程序的必备安装


大概您可以在此处提供IronPython安装可执行文件的路径。

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

但我不必正确安装它?只需按下所需的3个组件,对吗?IronPython.dll、Microsoft.Scripting.dll、Microsoft.Scripting.Code.dll-但我如何判断这三个程序集是否需要3.0或3.5才能正常运行?您还需要Microsoft.Scripting.ExtensionAttribute.dll,并且您可能需要IronPython.Modules.dll。您完全不需要安装,也不需要.NET30或3.5,但您确实需要.NET2.0的SP1。(如果已安装3.5,则自动安装2.0 SP1。)