Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move .NET libraries to a subdirectory?

Tags:

c#

.net

I want to put all libraries (dll) used by my application to a subdirectory (let' say named "lib"). How to instruct assembly loader to look for referenced assemblies in that particular directory (which is a subdirectory of a directory, where main assembly exists)?

I assume it should be done by some settings in app.config, right?

like image 881
Dawid Ohia Avatar asked Dec 27 '09 11:12

Dawid Ohia


1 Answers

probing paths in your app.config. To borrow the example from MSDN:

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <probing privatePath="bin;bin2\subbin;bin3"/>
      </assemblyBinding>
   </runtime>
</configuration>
like image 115
Marc Gravell Avatar answered Sep 24 '22 01:09

Marc Gravell