[IronPython] IronPython.Runtime.Types.PythonType Is not marked as Serializable Exception

mohammad mustaq mustaq2001 at gmail.com
Tue Mar 30 05:13:08 CEST 2010


Hi,

I have IronPython embedded in my C# application. I face issues while
creating the python engine in a different appdomain.

It is imposed that every class in IronPython inherit the .NET base class say
ClassA. ClassA is derived from MarshalByRefObj as I need to pass an instance
of this class to a new appdomain.
I create a new appdomain and pass the instance of ClassA to this Appdomain.
While calling a method in python class through the instance of ClassA I get
an exception mentioning that "Type 'IronPython.Runtime.Types.PythonTyp
e' in Assembly 'IronPython, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' is not marked as serializable".

How do I Serialize this PythonType. One way that i know is to modify the
IronPython source and mark the required types as Serializable (but i do not
know where it will lead to and its consequences). Could you please suggest a
way to perform the required operation. Should you need more details let me
know.

thanks,
Mustaq

P.S. I have used both IronPython 2.0 and 2.6.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100330/bc6b9ef7/attachment.html>


More information about the Ironpython-users mailing list