Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-06-11
4
Medium Priority
?
204 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…

715 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