Solved

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

Posted on 2008-06-11
4
196 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 69

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 69

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
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…
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 connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now