is it possible that an winform app load its dll from path other then the root?
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 loca开发者_如何学Gol attribute set to yes?
Edit:
also relevant is the following question How can I set PrivateBinPath in MEF?The runtime will probe for assemblies in the following order:
- The Global Assembly Cache (GAC)
- 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
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
精彩评论