【问题标题】:How can I set PrivateBinPath in MEF?如何在 MEF 中设置 PrivateBinPath?
【发布时间】:2009-04-30 11:27:44
【问题描述】:

如何在 MEF 中设置 PrivateBinPath?

这就是我想要做的:How to change the loading path of references in .NET?

【问题讨论】:

    标签: dll plugins mef


    【解决方案1】:

    您可以通过应用程序配置文件:assemblyBinding 元素,更准确地说 - probing

    <configuration>
       <runtime>
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
             <probing privatePath="bin;bin2\subbin;bin3"/>
          </assemblyBinding>
       </runtime>
    </configuration>
    

    这将强制运行时在binbin2bin2\subbinbin3 目录中查找程序集,所有这些目录都是应用程序基目录的子目录。

    【讨论】:

    • 谢谢你,用这个把我的头发扯掉了!
    猜你喜欢
    • 2015-03-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多