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

Repost - Project's Referenced Non-GAC Assemblies

P: n/a
(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.

Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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").

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Jimi" <ji************@yahoo-dot-ca.no-spam.invalid> wrote in message
news:40**********@127.0.0.1...
(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.


Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more C# / C Sharp Questions on Bytes