Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / October 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BR@dontmail - 14 Oct 2005 18:48 GMT
Is there a way to tell what exe is using which version of a .dll in the
gac?
BR@dontmail - 14 Oct 2005 19:03 GMT
I guess i should add,  there are 5 versions of a .dll and i am not sure
what code is pointing at which version
Peter Rilling - 14 Oct 2005 19:10 GMT
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.

>I guess i should add,  there are 5 versions of a .dll and i am not sure
> what code is pointing at which version
BR@dontmail - 14 Oct 2005 19:25 GMT
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.
Ollie Riches - 15 Oct 2005 17:20 GMT
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
> 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.
Peter Rilling - 17 Oct 2005 05:55 GMT
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.

> 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.
BR@dontmail - 18 Oct 2005 22:32 GMT
Yes, i was looking for a relationship back from the assembly dll
Thanks anyway

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.