I have some issue with a program I'm working on. It's composed of 2 DLLs, with dll A referencing dll B. Dll A contains one public method, in which first action (before instanciating any class in B) is to check some network location to see if a new version of dll B is available. If so, it downloads it at the same location of current B, which should not be a problem since nothing from B is instanciated. Sadly, it is instanciated and so I get an error it is already referenced by the process that owns A and cannot be replaced.
Do you have any idea of the reason why it is already referenced, and if there is any solution to avoid this?
public class L10nReports//Class in DLL A
{
public L10nReports() //constructor
{
}
//only public method is this class
public string Supervise(object projectGroup, out string msg)
{
//Checks for updates of dll B and downloads it if available. And fails.
manageUpdate();
//first instanciation of any class from dll B
ReportEngine.ReportEngine engine = new ReportEngine.ReportEngine();
string result = engine.Supervise(projectGroup, out msg);
return result;
}