如何在MEF中设置PrivateBinPath? [英] How can I set PrivateBinPath in MEF?
本文介绍了如何在MEF中设置PrivateBinPath?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在MEF中设置PrivateBinPath?
How can I set PrivateBinPath in MEF?
这是我正在做的:如何更改.NET中引用的加载路径?
推荐答案
您可以通过应用程序配置文件执行此操作: assemblyBinding 元素,更准确地说 - 探测:
You can do this through application config file: assemblyBinding element, more precisely - 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
目录,所有这些都是应用程序的基本目录的子目录。
This will force runtime to look for assemblies in bin
, bin2
, bin2\subbin
and bin3
directories, all of which are subdirectories of the application's base directory.
这篇关于如何在MEF中设置PrivateBinPath?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文