vitenyi_i

vitenyi_i

  • NA
  • 38
  • 0

Reflection problem

Apr 17 2004 12:32 AM
I'm working on a utility to provide an overview of one's .NET projects and one of the things I want to display is detailed information about what each project references, whether it is assemblies in the GAC or other .NET projects. From the project file I can get the assembly names of all assemblies referenced by a project, including other projects, via the GetReferencedAssemblies method on the Assembly object, but there seems to be no way to get from the assembly name to an actual assembly object (since it's not in the GAC), without knowing the path. I know that the referenced project probably has a dll in its bin directory, but I don't know where that referenced project exists - a referenced project's location isn't included in the project file containing the reference. Do I need to scan entire drives to find the referenced project's assembly dll? This seems crazy - there must be an easy way to get to the debug assemblies of referenced projects without knowing the paths. I also don't want the user to have to indicate the solution file - the project could be part of multiple solutions.