开发者

How to define custom path to Interop *.dll

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 开发者_StackOverflow社区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


I fixit... Visual studio 2008 C++/CLI automatically create config file with name app.config . I changed this name with assembly name MyProject.exe.config and it works now...There is a hidden convention i think assembly.dll.config or assembly.exe.config naming pattern which i do not know...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜