3
Answers

Problem load a dll dynamically

Diego

Diego

13y
2.8k
1
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)