Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using unmanaged code to find assembly location

13 views
Skip to first unread message

Sruli Ganor

unread,
Jan 10, 2011, 9:30:42 AM1/10/11
to
Hi,

I have to write a program that gets a .Net exe assembly and finds all
its assembly references (i.e. DLL's).
For each such assembly reference it should find the location on disk
(either app directory, GAC, private path, etc.) from which CLR will
ooad it in runtime according to the CLR rules.

I cannot use .Net reflection, because I don't know in what order to
load the DLL's and what prerequisites are necessary (and also to save
time).

I tried to use C++ IMetaDataAssemblyImport and IMetaDataImport
interfaces.
They give me the name of the referenced assemblies but not their
locations.

Does somebody know how to do it?

TIA
Sruli

0 new messages