[IronPython] Question on loading assembly from byte array
dinov at microsoft.com
Thu Apr 2 11:12:06 PDT 2009
You can do:
from System.IO import File
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Samuel Tjokrosoesilo
Sent: Thursday, April 02, 2009 10:43 AM
To: Discussion of IronPython
Subject: [IronPython] Question on loading assembly from byte array
I would like to be able to load assembly from byte array inside of IronPython.
Is there any way to do it directly in IronPython? I'm unable to run something like clr.AddReference(byte ).
Below is what I do in .NET DLR in order to make this work:
 rawAssemblyFile = File.ReadAllBytes(assemblyName);
Another alternative that I use would be the following:
byte rawAssemblyFile = File.ReadAllBytes(assemblyName);
rawAssembly = Assembly.Load(rawAssemblyFile);
I'm just wondering if there's a cleaner way to do this whole thing inside of IronPython.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users