Just a note: even if you use project reference in Visual Studio (which is the best way to set references), during run-time is works like a reference to assembly.
To test references during run time, use
System.Reflection.Assembly.GetReferencedAssemblies
for any given assembly instance. For each returned instance of
System.Reflection.AssemblyName
you can also check
System.Reflection.AssemblyName.CodeBase
to compare with the executable module files you have.
In particular, you can use during run time it with the following assemblies:
System.Reflection.Assembly.GetEntryAssembly()
,
GetCallingAssembly()
or
GetExecutingAssembly()
.
See
http://msdn.microsoft.com/en-us/library/system.reflection.assembly.aspx[
^].
If does not check up for dynamically loaded assemblies and native P/Invoked code. For native code, use Microsoft
Dependency Walker, see
http://en.wikipedia.org/wiki/Dependency_Walker[
^],
http://www.dependencywalker.com/[
^].
—SA