Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem getting assemblies list outside class dll
Message
De
06/04/2010 06:46:55
Vladimir Zhuravlev
Institute of the Physics of Earth,Russia
Moscow Region, Russie
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Problem getting assemblies list outside class dll
Divers
Thread ID:
01458885
Message ID:
01458885
Vues:
102
I already asked similar question, but still have problem with it
Let we have class with method
GetMyAssName()
public string GetMyAssName()
      {
            string vbTab = "   ";
            var usedAssemblies = AppDomain.CurrentDomain.GetAssemblies();
            foreach (Assembly ass in AppDomain.CurrentDomain.GetAssemblies())
            {
                vbTab = vbTab + "*loc*" + ass.Location + "//";
            }

            return vbTab;
        }
If to call this metod inside this class we get some lists of dll s
Now, let make ddl of thgis class ( class library dll)
And call this method outside this class in otehr c module
 DotNetBridgeLib.DotNetBridge oDotNetBridge = new DotNetBridgeLib.DotNetBridge();
               string  sprp = " " ;
              
               sprp = oDotNetBridge.GetMyAssName();
               
                Console.WriteLine(sprp);
It prints me only 3 dll - DotNetBridgeLib ( my class dll name with this metod )

C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
and
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll

I assumed to see all net dll libraries list like we see in net reflector
This is propably because my class needs only these 2 libraries.
Whet NET reflector does to get assembly list?
If to call method in the same module, where it is, it gives long list of dll s
Thanks in advance, Vladimir
MVP-2006-2011, PHD in Math and Physics ,
host of www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform