Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

How to help the CLR to find .Net .dll's on which a COM Visible .dll is dependent.

$
0
0

OK, here is the setup:

  • A VB6 .exe that consumes some .Net classes.
  • The classes reside in 5 .dll's but are exposed through one COM visible wrapper .dll
  • Using an application manifest I can store the COM visible MyCOMVisibleWrapper.dll (and .tlb) wrapper in a subfolder named MyCOMVisibleWrapper.
  • I would like to store the dependent .Net .dlls in that folder too.
  • However the CLR looks for these .dll's in the folder where the VB6 executable resides, not in the folder where the wrapper .dll lives.

How can I add the MyCOMVisibleWrapper folder to the resolution path? I tried including a MyCOMVisibleWrapper.dll.config file with a<probing privatePath=MyComVisibleWrapper/> tag, but that doesn't work. I read about implementing the AssemblyResolve EventHandler but I am unsure about where to put that, as the .Net code has no main entry point.


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>