Home All Groups Group Topic Archive Search About

How to load an external assembly with references?

Author
28 Nov 2006 9:17 AM
W. Jordan
Hello,

I am trying to load an assembly A which references an external assembly B,
by using Assembly.LoadFile method. A was loaded but B was not.
When I try to invoke a method in A, which requires assembly B, it fails.
How can I solve this?

--


Best Regards,
W. Jordan

Author
28 Nov 2006 11:41 AM
Vadym Stetsyak
Hello, W.!

There are several ways how to resolve.
- you can load assembly B prior to A
- put B's path into binding redirection config.

Have a loot here how runtime locates assemblies
( http://msdn2.microsoft.com/en-us/library/yx7xezcf.aspx )

WJ> I am trying to load an assembly A which references an external
WJ> assembly B,
WJ> by using Assembly.LoadFile method. A was loaded but B was not.
WJ> When I try to invoke a method in A, which requires assembly B, it
WJ> fails.
WJ> How can I solve this?

WJ> --


WJ> Best Regards,
WJ> W. Jordan





--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Author
29 Nov 2006 6:11 AM
W. Jordan
Thank you for your reply.

I tried loading B prior to A. However, an object OBJ created with the method
in A was used as an ExtentionObject for an XSLT file. The XSLT file
reported that it could not locate B, when it tried to execute a method
provided by OBJ.

I forgot to say that the B is in another drive, the binding redirection
does not work in such a scenario. And what's more, is it possible
not to modify the configuration file?


--


Best Regards,
W. Jordan



Show quote
"Vadym Stetsyak" <vady***@ukr.net> wrote
news:%23TqUvFuEHHA.3836@TK2MSFTNGP02.phx.gbl...
> Hello, W.!
>
> There are several ways how to resolve.
> - you can load assembly B prior to A
> - put B's path into binding redirection config.
>
> Have a loot here how runtime locates assemblies
> ( http://msdn2.microsoft.com/en-us/library/yx7xezcf.aspx )
>
> WJ> I am trying to load an assembly A which references an external
> WJ> assembly B,
> WJ> by using Assembly.LoadFile method. A was loaded but B was not.
> WJ> When I try to invoke a method in A, which requires assembly B, it
> WJ> fails.
> WJ> How can I solve this?
>
> WJ> --
>
>
> WJ> Best Regards,
> WJ> W. Jordan
>
>
>
>
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.blogspot.com

AddThis Social Bookmark Button