【发布时间】:2011-01-10 13:26:03
【问题描述】:
嗯,
我有一个 ActiveX (*.ocx) 组件,我在 托管 C++/CLI 项目中使用它:围绕 ActiveX 组件编写托管包装器[NET 有一个很棒的互操作服务:为我提供了生成的 dll,所以我可以很容易地在我的托管代码中使用它]
问题是 Visual Studio (2008) 自动将 生成的 Interop *.dll 复制到 我的 *.exe 文件所在的目录。但我想把所有我生成的 Interop *.dll 到一个文件夹...
假设我的目录结构是这样的:
D:\MyProject\Output\MyProject.exe //我管理的 exe
D:\MyProject\Output\Interop.XXXLib.1.0.dll // *Interop .dll
我想把 Interop.XXXLib.1.0.dll 放到新文件夹中
D:\MyProject\Output\Interops
并从该目录中使用它...我该怎么做?
最好的祝福
PS:
到目前为止,我发现在我的 app.config 文件中使用 codeBase/ 探测标签,例如
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com.asm.v1">
<probing privatePath="Interops" />
</assemblyBinding>
</runtime>
</configuration>
但我没有在 C++/CLI 中工作
【问题讨论】:
标签: dll interop managed-c++