Anthony LaMark
7/31/2007 2:14:00 AM
Hi All,
I have a .Net Assembly that is COM enabled (COM-Interop) and so is
instantiated and used in vbscript and jscript. I install it into the GAC
(during our installation program). This assembly has dependencies on other
..net assemblies (from another companion product) to run. These dependency
assemblies are not put into the GAC though. When I compile my assembly, I
have the companion product assemblies defined as references within the
Visual Studio project. I can find where the dependency assemblies are on
the hard drive by going to the registry though so I can determine their
location. My current problem is that at run-time I cannot use app.config
file to do load the dependent .net assemblies (because the host process is
cscript.exe which is in Windows\system32), rather I am hoping to be able to
have a hook in my .Net Assembly to be able to load the dependency
assemblies. I have read over Assembly.Load and so it looks do-able but I
think I need to not link the dependencies into the dll (i.e. static link)
since I can see that when the system loads my assembly, it is trying to
resolve the dependency assemblies as well. I see this with fuslogvw.exe.
Any advice would be greatly appreciated!