[IronPython] Creating Dynamic Assemblies from IronPython 2.6

Curt Hagenlocher curt at hagenlocher.org
Sat Mar 21 01:29:00 CET 2009

I think this is something that broke well before the 2.0 release.  To work
around it in pyc.py, we added DefineDynamicAssembly to the PythonOps class
in IronPython:

import clr
from IronPython.Runtime.Operations import PythonOps
assemblyBuilder = PythonOps.DefineDynamicAssembly(...)

2009/3/20 Jeff Hardy <jdhardy at gmail.com>

> Hi all,
> I'm unable to create a Dynamic assembly from IronPython using
> AppDomain.DefineDynamicAssembly. The Python file attached results in
> the following error:
> Traceback (most recent call last):
>  File "pinvoke.py", line 5, in pinvoke.py
>  File "mscorlib", line unknown, in DefineDynamicAssembly
>  File "mscorlib", line unknown, in InternalDefineDynamicAssembly
>  File "mscorlib", line unknown, in nCreateDynamicAssembly
>  File "mscorlib", line unknown, in CheckGrantSetHelper
> SystemError: Object reference not set to an instance of an object.
> The equivalent C# program (also attached) works fine. I'm guessing
> there's something special about IronPython's AppDomain, but I'm not
> sure what it is. This is using revision 48140. Any ideas?
> - Jeff
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090320/a1fc09e6/attachment.html>

More information about the Ironpython-users mailing list