How can I set PrivateBinPath in MEF?

后端 未结 1 541
夕颜
夕颜 2020-12-11 11:45

How can I set PrivateBinPath in MEF?

This is what I\'m trying to do : How to change the loading path of references in .NET?

相关标签:
1条回答
  • 2020-12-11 12:41

    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>
    

    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.

    0 讨论(0)
提交回复
热议问题