Diego

Diego

  • NA
  • 21
  • 0

Problem load a dll dynamically

Jan 19 2011 6:02 PM
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)