Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top