HighTechTalks DotNet Forums  

Advice on dynamically loading .Net assembly when cscript.exe is the hosting process

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Advice on dynamically loading .Net assembly when cscript.exe is the hosting process in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Anthony LaMark
 
Posts: n/a

Default Advice on dynamically loading .Net assembly when cscript.exe is the hosting process - 07-30-2007 , 10:14 PM






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!



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.