Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4249314
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:22:50+00:00 2026-05-21T04:22:50+00:00

Can anyone recommend a tool (ideally FOSS) that can analyse an .NET assembly and

  • 0

Can anyone recommend a tool (ideally FOSS) that can analyse an .NET assembly and list its dependencies?

What I am after is a tool that given a .NET exe file can produce a report showing me the .NET assemblies (name, version, strong name, location/GAC) its is linked to; in order to assist diagnosis when a deployment fails and the application wont run.

The fuse-log viewer helps do this when its already gone wrong but its a bit clunky. I would rather be able to analyse the assembly pro-actively and see what it will need at runtime so I can validate they are present. I have looked at various reflector tools, but whist these list classes in all the linked assemblies, and names non of them seem to indicate strong names, versions etc.

Resolution

Thankyou all for the very useful feedback. Whilst ILDASM provides what I need for free (and I should have remembered that) its not very elegant in use when all you want is application “x.exe”‘s dependancies.

.NET Reflector is not free anymore and neither is NDepend (for my usage terms) so those had to be rejected.

So I have created what is possibly the world’s simplest console application which takes a filename and prints the dependancy names and verions based on Arve’s answer which is quite suffient for my needs.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;

namespace AssemblyDependencyViewer
{
class Program
{
    static void Main(string[] args)
    {
        if (File.Exists(args[0]))
        {
            DumpFileReferences(args[0]);
        }
        else
        {
            var dir = new DirectoryInfo(args[0]);
            if (dir.Exists)
            {
                var files = dir.GetFiles()
                    .Where((s) =>
                    {
                        return (s.Extension == ".exe") || (s.Extension == ".dll");
                    })
                    .OrderBy((s2) =>
                    {
                        return s2.Name;
                    })
                    ;

                foreach (var file in files)
                {
                    Console.WriteLine(string.Format("=== File {0} ====", file.FullName));
                    DumpFileReferences(file.FullName);
                }
            }
        }

        Console.ReadKey(false);
    }

    private static void DumpFileReferences(string fileName)
    {
        try
        {
            var assembly = Assembly.ReflectionOnlyLoadFrom(fileName);
            var refs = assembly.GetReferencedAssemblies();

            foreach (var x in refs.OrderBy((s) =>
            {
                return s.Name;
            }))
            {
                PrintFilename(x);
            }
        }
        catch (BadImageFormatException bif)
        {
            Console.WriteLine(bif.Message);
        }
        catch (FileLoadException fl)
        {
            Console.WriteLine(fl.Message);
        }
    }

    private static void PrintFilename(AssemblyName x)
    {
        if (x.Name.StartsWith("Apdcomms"))
        {
            Console.ForegroundColor = ConsoleColor.Magenta;
        }
        Console.WriteLine(string.Format("{1,-10} {0}", x.Name, x.Version));
        Console.ResetColor();
    }
}
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:22:51+00:00Added an answer on May 21, 2026 at 4:22 am

    It is not that difficult to create such a tool yourself:

    var assembly = Assembly.ReflectionOnlyLoadFrom(@"..the file...");
    
    var refs = assembly.GetReferencedAssemblies();
    

    refs will then contain the direct references.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone recommend a Prolog compiler for .Net. The ones that I have been
Can anyone recommend a free tool for generating Charts compatible with ASP.NET MVC?
Can anyone recommend a good server-side PDF generation tool that would work in a
Can anyone recommend a free or commercial tool that detects memory corruption (NOT memory
Can anyone recommend a development tool I can use to build SCORM 1.2 content?
Can anyone recommend a based open source mailing list software ? The following would
Can anyone recommend tools or articles that help me to learn how to TDD
Can anyone recommend decent software that could replace a physical whiteboard, as used in
Can anyone recommend a Java library that would allow me to create a video
can anyone recommend tools/plugins that are capable of normalizing the coding style of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.