Solved

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

Posted on 2008-06-11
4
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 20 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

617 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