sexta-feira, 27 de abril de 2012 08:22The scenario goes like this. In general I am trying to develop an addin driven application. I have a core dll. This dll is hosted on the default AppDomain. My addin application also uses a copy of the core dll. Using System.AddIn(MAF) I am able to load the the addin but when I try to unload the addin, it seems that I am unable to unload the core dll because when I try to replace the dll of the entire addin, I can't replace the core dll saying that it is currently being used. Can somebody explain to me what is the idea behind? thank you.
Todas as Respostas
segunda-feira, 30 de abril de 2012 05:33
As long as the dll is used by another process/application/domain it cannot be unloaded.
Have you tried with AppDomain.Unload() method?
If not you can try the same. During the unload time all the resources are blocked from access and freed.
Resolving n Evolving in C# (http://jeanpaulva.com)
segunda-feira, 30 de abril de 2012 05:58
Yes I already did try the AppDomain.unload() method before but same thing happened. Below is the illustration of the program.
- Other dll
- AddIn Folder
- Other dll
Basically, Both HostProgram and AddInProgram uses the same Core.dll but with a separate copy. When AddInProgram is loaded, it will look for Core.dll as part of its dependencies. When I unload the addin while the program is still running, the only dll I couldn't replace or remove is the core.dll. I'm thinking it's because it's been loaded on the host AppDomain. Could it be possible?
sexta-feira, 4 de maio de 2012 03:27
- Marcado como Resposta Bob ShenMicrosoft Contingent Staff, Moderator quarta-feira, 9 de maio de 2012 03:05