That's not the way that assemblies in the GAC work. There is no static piece
of data anywhere in the system that contains a list of all the assemblies
that contain references to an assembly in the GAC. A different mechanism for
tracking references was used.
Currently, each time an assembly is installed into the GAC an object called
an InstallReference is used to identify the entity that is installing the
assembly into the GAC. There are various options with this object but you
can think of it as a key that should be unique per entity that installs an
assembly into the GAC. Each unique key is added to the store associated with
the GAC'd assembly. These are the references that get listed...they are not
individual assembly references, they are installing entity references.
When the assembly is uninstalled the same key should be passed to the
uninstall routine, and the key is removed from the GAC. When all the keys
have been removed the assembly itself is removed from the GAC.
The problem you are experiencing is that you have a running application that
has opened up the assembly, and until you get that app or service to
terminate the operating system wont let you delete the file. Use the
SysInternals process explorer to search for who has that assembly loaded. It
may be a service (perhaps a SQL or web service?) that needs to be shutdown.
Many of these details are explained at this blog...
http://blogs.msdn.com/junfeng/archive/2004/09.aspx
Juan Dent said:
Looking at the manifest of the assembly I am not able to delete from the
GAC
will not help. It will tell me its dependencies but not who else depends
on
it.
No, there must be someway to find out when an assembly states that another
one uses it, to find out who it is referring to..