3
Reply

Problem load a dll dynamically

Diego

Diego

Jan 19 2011 6:02 PM
2.7k
Hello All,
I have a webservice application and the following code:



private static Type buildType(string fullNameClass)
{
    Type autType = null;
    AppDomain app = AppDomain.CurrentDomain;
   
    foreach(Assembly assembly in app.GetAssemblies())
   {
     autType = assembly.GetType(fullNameClass);
     if(autType != null)
        break;
   }

   return autType;


}


The problem is that sometimes the app.GetAssemblies() does not return the DLL
expected
. Its find the DLL for about an hour and then stop.

Thank for any help.


Answers (3)