【发布时间】:2009-04-30 11:27:44
【问题描述】:
如何在 MEF 中设置 PrivateBinPath?
这就是我想要做的:How to change the loading path of references in .NET?
【问题讨论】:
如何在 MEF 中设置 PrivateBinPath?
这就是我想要做的:How to change the loading path of references in .NET?
【问题讨论】:
您可以通过应用程序配置文件:assemblyBinding 元素,更准确地说 - probing:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin2\subbin;bin3"/>
</assemblyBinding>
</runtime>
</configuration>
这将强制运行时在bin、bin2、bin2\subbin 和bin3 目录中查找程序集,所有这些目录都是应用程序基目录的子目录。
【讨论】: