Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Is it possible to list programatically all the DLLs reference by a project ?

Posted on 2008-06-11
4
Medium Priority
?
207 Views
Last Modified: 2013-11-26
Hi,

I my project on about screen i like to show all the DLLs reference by the project and their version numbers.

Does anybody know how to achieve this by programatically.

Thanks
Jyotika
0
Comment
Question by:jyotikasorathia
  • 2
4 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 21758954
See "reflector for .net" from http://www.aisto.com/roeder/dotnet/
0
 

Author Comment

by:jyotikasorathia
ID: 21759393
This is add-in. and does not have any code.

I need code that generates list of dll files with their version number.

Thanks
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 21759456
0
 
LVL 25

Accepted Solution

by:
apeter earned 60 total points
ID: 21760973
try below console app. which give the ref list for the current assembly.

public void GetRefAsm()
{
        Int32 indent = 0;
        // Display information about the EXE assembly.
        Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
        Display(indent, "Assembly identity={0}", a.FullName);
        Display(indent+1, "Codebase={0}", a.CodeBase);

        // Display the set of assemblies our assemblies reference.

        Display(indent, "Referenced assemblies:");
        foreach (AssemblyName an in a.GetReferencedAssemblies() )
        {
             Display(indent + 1, "Name={0}, Version={1}, Culture={2}, PublicKey token={3}", an.Name, an.Version, an.CultureInfo.Name, (BitConverter.ToString (an.GetPublicKeyToken())));
        }
        Display(indent, "");
}

// Display a formatted string indented by the specified amount.
    public void Display(Int32 indent, string format, params object[] param)
    {
        Console.Write(new string(' ', indent*2));
        Console.WriteLine(format, param);
    }

0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question