S
Satinderpal Singh
Hi All,
I have an EXE, I load the DLL from that exe in a seperate AppDomain. (I have
not given reference to that DLL from the EXE).
Now, i call some commands of that dll from the EXE, and in the background i
try to delete the DLL, it does not allows (fair enough).
Now, I unload that AppDomain using AppDomain.Unload method. Now, I try to
delete that DLL from the background it still does not allows, I thought the
reason could be Garbage Collector, but then I used System.GC.Collect
immediately after unloading the AppDomain, and also waited for 10-15 mins
before deleting it again, but it still does not allows, then i closed the
EXE and now it allows immediately.
What could be the reason ???
Does AppDomain works only for EXEs or is that we cannot unload an assembly
through AppDomain ???
I read few articles on net, www.gotdotnet.com says you can achieve the above
thing, but they have not given any example. Some articles says, this is not
possible, some says you use ShadowFolder of AppDomain to make this work,
with ShadowFolder it works fine, but i dont want to use it (i mean i dont
want to create a seperate folder and maintain a copy of my dll there).
Can anyone please help me out with this ?
I want to load and unload a DLL from the EXE and the moment I unload the
AppDomain of the DLL it should allow me to delete the DLL. This
functionality is to be achieved for AutoDeploy feature.
Thanks,
Satinder
I have an EXE, I load the DLL from that exe in a seperate AppDomain. (I have
not given reference to that DLL from the EXE).
Now, i call some commands of that dll from the EXE, and in the background i
try to delete the DLL, it does not allows (fair enough).
Now, I unload that AppDomain using AppDomain.Unload method. Now, I try to
delete that DLL from the background it still does not allows, I thought the
reason could be Garbage Collector, but then I used System.GC.Collect
immediately after unloading the AppDomain, and also waited for 10-15 mins
before deleting it again, but it still does not allows, then i closed the
EXE and now it allows immediately.
What could be the reason ???
Does AppDomain works only for EXEs or is that we cannot unload an assembly
through AppDomain ???
I read few articles on net, www.gotdotnet.com says you can achieve the above
thing, but they have not given any example. Some articles says, this is not
possible, some says you use ShadowFolder of AppDomain to make this work,
with ShadowFolder it works fine, but i dont want to use it (i mean i dont
want to create a seperate folder and maintain a copy of my dll there).
Can anyone please help me out with this ?
I want to load and unload a DLL from the EXE and the moment I unload the
AppDomain of the DLL it should allow me to delete the DLL. This
functionality is to be achieved for AutoDeploy feature.
Thanks,
Satinder