Solved

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

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

752 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