By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,709 Members | 2,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,709 IT Pros & Developers. It's quick & easy.

Is there a way to tell what exe is using which version of a .dll in the gac?

P: n/a
BR
Is there a way to tell what exe is using which version of a .dll in the
gac?

Oct 14 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
BR
I guess i should add, there are 5 versions of a .dll and i am not sure
what code is pointing at which version

Oct 14 '05 #2

P: n/a
You might be able to open the assembly using an object browser such as
Reflector (http://www.aisto.com/roeder/dotnet/) and locate the assembly
references within it to see what it is pointing to.

"BR@dontmail" <ac******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I guess i should add, there are 5 versions of a .dll and i am not sure
what code is pointing at which version

Oct 14 '05 #3

P: n/a
BR
Oh. ok , i was assuming there was a microsoft way to do this. Like
looking it up by the public token or by doing gacutil /resolve :) i
looked at the reflector just briefly , but am not sure this will
resolve it backwards to the exe that points to it.

Oct 14 '05 #4

P: n/a
I can think of two way to check which assemblies are loaded:

Either via visual stduio .net using the 'module' window when debugging the
application. The module window can be found at the menu Debug -> Windows ->
Modules

or

In code using reflection , something like this:

sing System;
using System.Reflection;

namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Assembly entryAssembly = Assembly.GetEntryAssembly();
AssemblyName[] assemblyNames = entryAssembly.GetReferencedAssemblies();
for(int i = 0; i < assemblyNames.Length; i++)
{
Console.WriteLine(assemblyNames[i].FullName);
}

Console.ReadLine();
}
}
}
HTH

Ollie Riches

IOn code using reflec
"BR@dontmail" <ac******@gmail.com> wrote in message
news:11********************@o13g2000cwo.googlegrou ps.com...
Oh. ok , i was assuming there was a microsoft way to do this. Like
looking it up by the public token or by doing gacutil /resolve :) i
looked at the reflector just briefly , but am not sure this will
resolve it backwards to the exe that points to it.

Oct 15 '05 #5

P: n/a
Okay, do you want to know what something references, or do you want to know
what something is referenced by? Also, do you want to know at runtime
through code or just run some tool at the command line?

There is no "backwards" in assemblies. For instance, if you have Foo.exe
which references Bar.dll, well, you can open Foo.exe with reflector and it
will tell you that Bar.dll is referenced. However, Bar.dll could also be
referenced by MyCoolProgram.exe. Do, as you can see, there can be no
relationship back from the assembly.

"BR@dontmail" <ac******@gmail.com> wrote in message
news:11********************@o13g2000cwo.googlegrou ps.com...
Oh. ok , i was assuming there was a microsoft way to do this. Like
looking it up by the public token or by doing gacutil /resolve :) i
looked at the reflector just briefly , but am not sure this will
resolve it backwards to the exe that points to it.

Oct 17 '05 #6

P: n/a
BR
Yes, i was looking for a relationship back from the assembly dll
Thanks anyway

Oct 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.