tags:

views:

72

answers:

2

I am including a library in my application, and it's copying 7 dlls with the same path as the exe.

But I want to put these dlls in a sub folder.

When I put the dlls in a subfolder the application doesn't see the dlls.

So is there any configuration that describe where should the application look for its dlls?

Also is it possible to change the location of the referenced dlls that have the copy local attribute set to yes?

Edit:
also relevant is the following question
http://stackoverflow.com/questions/806467/how-can-i-set-privatebinpath-in-mef

+1  A: 

Any "policy" for where dependent assemblies are loaded from is controlled by the AppDomain. You can configure other directories to be probed for private assemblies - see AppDomainSetup.PrivateBinPath for a starting point.

Aslo relevant: Question 806383

Bevan
+5  A: 

The runtime will probe for assemblies in the following order:

  1. The Global Assembly Cache (GAC)
  2. The application's working directory

Further probing paths can be set in the app.config file for the application:

http://msdn.microsoft.com/en-us/library/823z9h8w%28VS.80%29.aspx

More information about "How the runtime locates assemblies" can be found here:

http://msdn.microsoft.com/en-us/library/yx7xezcf%28vs.71%29.aspx

fletcher