开发者

I am getting XMLSerialisation exception when i try to use Assembly.Load and the second dll uses serialization

开发者 https://www.devze.com 2023-01-15 01:14 出处:网络
I 开发者_JAVA百科need to refer to another dll using reflection. Problem is that the second dll uses serialisation. That throws xmlserialisation exception when i try to load using

I 开发者_JAVA百科need to refer to another dll using reflection. Problem is that the second dll uses serialisation. That throws xmlserialisation exception when i try to load using Assembly. Load().

When i load using Assembly.LoadFrom() i am not able to delete the second dll after it has been used by the first dll.

Is there a way i can do that?


There is no way to do it in the same AppDomain as far as I am aware.

One possiblity is to have multiple AppDomains and one loading another AppDomain and run what is needed and then close that AppDomain which will release the lock on the assembly. It is a bit difficult to implement but if you have to do it, is doable. If you need help, give me a shout.

Update Provide the error message on serialisation so that we can dig that out as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消