|
|
|
start date: Wed, 22 Aug 2007 01:58:09 -0400,
posted on: microsoft.public.dotnet.framework.clr
back
| Thread Index |
|
1
Dave
|
|
2
Marc Gravell
|
|
3
Dave
|
loading referenced assemblies from a stream or bytes
I want to be able to read then dynamically load a main and dependent
assemblies from encrypted sources.
I can get the load the first one into memory by using assembly.load from
bytes. Is there a way to do this for the referenced assemblies as well? Not
system assemblies but the others that I create for a solution that are not
part of the main assembly.
Thanks,
Dave
Date:Wed, 22 Aug 2007 01:58:09 -0400
Author:
|
Re: loading referenced assemblies from a stream or bytes
It looks like the AppDomain.AssemblyResolve only fires after the
event, and doesn't allow you to override the behavior ;-(
Well... once you have loaded one assembly you could perhaps load
pre-emptively by walkint the reference tree (GetReferencedAssemblies).
You need to keep track of what you have loaded, not necessarily to
prevent re-loads (the framework will tae care of this), but more to
prevent cycling (there are loops at the bottom...).
Marc
Date:Wed, 22 Aug 2007 08:12:01 +0100
Author:
|
Re: loading referenced assemblies from a stream or bytes
Thanks Marc. Will look into that.
"Marc Gravell" wrote in message
news:eyegGuI5HHA.4676@TK2MSFTNGP05.phx.gbl...
> It looks like the AppDomain.AssemblyResolve only fires after the event,
> and doesn't allow you to override the behavior ;-(
>
> Well... once you have loaded one assembly you could perhaps load
> pre-emptively by walkint the reference tree (GetReferencedAssemblies). You
> need to keep track of what you have loaded, not necessarily to prevent
> re-loads (the framework will tae care of this), but more to prevent
> cycling (there are loops at the bottom...).
>
> Marc
>
Date:Thu, 23 Aug 2007 10:10:28 -0400
Author:
|
|
|