How to define custom path to Interop *.dll

Posted by NoviceAndNovice on Stack Overflow See other posts from Stack Overflow or by NoviceAndNovice
Published on 2011-01-10T13:26:03Z Indexed on 2011/01/10 14:53 UTC
Read the original article Hit count: 262

Filed under:
|
|

Well,

I have an ActiveX (*.ocx) component, and i use it in a managed C++/CLI project: write a managed wrapper around ActiveX component[ NET has a great Interop services : provides me genarated dll so i can easily use it in my managed code]

The problem is that Visual Studio (2008) automatically copy the generated Interop *.dll to the directory where my *.exe file stay.But i want put all my genarated Interop *.dll to a folder ...

Suppose My directory structure is so:

D:\MyProject\Output\MyProject.exe //My mamanged exe

D:\MyProject\Output\Interop.XXXLib.1.0.dll // *Interop .dll

I want to put Interop.XXXLib.1.0.dll into new folder

D:\MyProject\Output\Interops

and use it from that directory...How Can i do it?

Best Wishes

PS:

What I found so far was using using codeBase/ probing tags in my app.config file such as

<?xml version="1.0"?>
<configuration>
  <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com.asm.v1">
        <probing privatePath="Interops" />
     </assemblyBinding>
  </runtime>
</configuration>

But i did not work in C++/CLI

© Stack Overflow or respective owner

Related posts about dll

Related posts about interop