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
clr.AddReference('IronPython')
from IronPython.Runtime.Operations import PythonOps
assemblyBuilder = PythonOps.DefineDynamicAssembly(...)

2009/3/20 Jeff Hardy <jdha...@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@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to