You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var eng = IronPython.Hosting.Python.CreateEngine();
from inside a referenced project, a
NullReferenceException
at IronPython.Runtime.Importer.ImportReflected(CodeContext context, String name)
will get thrown.
Continue during debugging in VS does work, though, and will create a usable engine nevertheless.
Steps to Reproduce
Create a Windows Forms Application and a library project.
Install the IronPython NuGet package in the library project and use the code above to create an engine from within the referenced assembly.
Running the code from within the library throws the NullReferenceException in Importer.ImportReflected().
Trying the exact same steps directly in the main application works without problems.
Version Information
.NET 4.8
Windows Forms application/library
IronPython 3.4.1 installed via NuGet
The text was updated successfully, but these errors were encountered:
Thanks for the sample. It looks like Visual Studio is trying to be smart and isn't copying IronPython.Modules.dll to the IronPythonTest/bin/Debug folder which is what's causing the NullReferenceException.
Ah, of course!
The NullRefException disappears if I manually copy over all the missing assemblies (IronPython.Modules.dll, IdonPython.SQLite.dll and IronPython.Wpf.dll) to my output folder manually.
Could it be that the nuspec file is missing those references?
Description
When calling
from inside a referenced project, a
will get thrown.
Continue during debugging in VS does work, though, and will create a usable engine nevertheless.
Steps to Reproduce
Create a Windows Forms Application and a library project.
Install the IronPython NuGet package in the library project and use the code above to create an engine from within the referenced assembly.
Running the code from within the library throws the
NullReferenceException
inImporter.ImportReflected()
.Trying the exact same steps directly in the main application works without problems.
Version Information
The text was updated successfully, but these errors were encountered: