Reputation: 21855
I have the following simple folder structure:
Root
Root\Executable.exe
Root\Subfolder
Root\Subfolder\Control.dll
Root\Subfolder\ControlDependency.dll
The subfolder has a control based on a 3rd party library. I expected the control to load its dependencies from its own folder but instead it is looking for dependencies in the executable folder.
Is this normal and why it is happening?
Upvotes: 0
Views: 59
Reputation: 946
When you build the project, all the referenced assemblies will be copied in the output folder and then referenced. The .NET CLR follows these steps to assembly resolving:
If you need to load an assembly at runtime which can be located in any folder (not only the bin folder of the application) you can use one of these three methods:
Please, follow this links to learn more:
Upvotes: 1