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.
精彩评论