Repost - Project's Referenced Non-GAC Assemblies

  • Thread starter Thread starter Jimi
  • Start date Start date
J

Jimi

(Sorry for the repost, but I thought maybe I'd have better luck this
time)

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
non-GAC assemblies 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.
 
Hi,

I think the information on all referenced assemblies, be it project
references or just plain assemblies should be available from the .csproj
file itself, so there is no need to use GetReferencedAssemblies.

On the other hand, you should consider the rules by which referenced
assemblies are located by the loader (there is a topic in the MSDN library
called something like "How the runtime locates assemblies").
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top