|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to load an external assembly with references?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 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 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? -- Show quoteBest Regards, W. Jordan "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 |
|||||||||||||||||||||||