jschementi / iron

[Jimmy Schementi's development fork] Implementations of Python and Ruby programming languages for .NET Framework that are built on top of the Dynamic Language Runtime.
http://ironruby.net
17 stars 2 forks source link

NullReferenceException while creating IronPython engine in referenced project #35

Open martinmueller4voice opened 8 months ago

martinmueller4voice commented 8 months ago

Problem

NullReferenceException
   at IronPython.Runtime.Importer.ImportReflected(CodeContext context, String name)

when calling

var eng = IronPython.Hosting.Python.CreateEngine();

Continue does work, though, and will create a usable engine nevertheless.

Environment

Steps to reproduce

When an IronPython engine is created in the main application project, the code above works without problems. If I move the exact same code to a library project and reference this library project from my main application, the NullReferenceException will get thrown.