>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
From help on GetAssemblies():
"Gets the assemblies
that have been loaded into the execution context of this application domain"
You may need to load the assembly of interest directly -
http://msdn.microsoft.com/en-us/library/25y1ya39.aspx