Home All Groups Group Topic Archive Search About

Loading an assembly from a stream

Author
28 Jul 2006 7:23 AM
hmoeller
Is there a way to load an assembly from a stream instead of from the
file system? The static methods in System.Assembly.Reflection don't
support anything other than file names or assembly names as a source
for the various Load methods.

TIA

Henning.

Author
28 Jul 2006 7:47 AM
Markus Stoeger
hmoeller wrote:
> Is there a way to load an assembly from a stream instead of from the
> file system? The static methods in System.Assembly.Reflection don't
> support anything other than file names or assembly names as a source
> for the various Load methods.

I haven't checked the docs right now, but I know there is some
Assembly.Load method that takes a byte array. You just have to read the
bytes from the stream into an array and pass that to the load function.

Can you get it to work with that? If not, I'll go check the docs later.

Max
Author
28 Jul 2006 8:25 AM
hmoeller
Markus Stoeger wrote:
> I haven't checked the docs right now, but I know there is some
> Assembly.Load method that takes a byte array. You just have to read the
> bytes from the stream into an array and pass that to the load function.
>
> Can you get it to work with that? If not, I'll go check the docs later.

*Blush* I focused my search on "Stream". Obviously, this is exactly
what I was looking for. Thanks a lot.

Henning.

AddThis Social Bookmark Button