dll file is getting locked even after the domain in which it is loaded is unloaded
hi,
i am having a problem with dyanmic loading of assemblies.the problem is that the dll file is getting locked even after the domain in which it is loaded is unloaded.The code below shows a dll search being loaded in domain appdomain.then we get a specific type from the dll and unload the domain thereafter.
Now if we want to replace the search dll or delete it ,it is shown as being used and hence can't be deleted.
But unloading a domain should have made it free.Does anyone have a solution for this behaviour .please help.code is as follows
===============================
AppDomain appdomain = AppDomain.CreateDomain("loader domain");
Type t =appdomain.Load(@"Search").GetType("Search.Component");
AppDomain.Unload(appdomain);
===============================================
i could have used shadow property but then i am unloading the domain hosting it so there should be no reference to it in the memory
regards,
ramneek

