[Ironpython-users] MissingMethodException

Mavridisz Vaszilisz vaszilisz at gmail.com
Tue Aug 7 17:03:11 CEST 2012


Hi!
I'm using IronPython 2.7.3, and Visual Studio 2010.
I try to run this simple code, but i always get a " MissingMethodException
". Does anyone have any idea what could i miss?

Exception message :

Method not found: 'System.Reflection.MemberInfo[]
Microsoft.Scripting.Generation.CompilerHelpers.FilterNonVisibleMembers(System.Type,
System.Reflection.MemberInfo[])'.

The code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IronPython.Hosting;
using IronPython.Runtime;
using Microsoft.Scripting;
using Microsoft.Scripting.Hosting;
namespace ipyTest
{
    class Program
    {
        private static ScriptEngine pyEngine = null;
        private static ScriptRuntime pyRuntime = null;
        private static ScriptScope pyScope = null;
        static void Main(string[] args)
        {
            pyEngine = Python.CreateEngine();
            pyScope = pyEngine.CreateScope();
            string _script =
                @"import sys" + Environment.NewLine +
                @"print sys.path";
            ScriptSource source =
pyEngine.CreateScriptSourceFromString(_script, SourceCodeKind.Statements);
            CompiledCode compiled = source.Compile();
            Console.WriteLine(compiled.Execute(pyScope));
        }
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120807/8bfd5ea8/attachment.html>


More information about the Ironpython-users mailing list