Dll libraries
-
Since that I have created about 15 separate libraries for the main exe, they are in the same folder as exe. I was thinking of putting those class libraries (DLLs) into a folder called "Libraries" in the main exe folder, so that the directory will look cleaner and organized. How can I do that so that the exe file can load libraries from "Libraries" folder? I'm using Visual Studio 2010 Premium.
-
Since that I have created about 15 separate libraries for the main exe, they are in the same folder as exe. I was thinking of putting those class libraries (DLLs) into a folder called "Libraries" in the main exe folder, so that the directory will look cleaner and organized. How can I do that so that the exe file can load libraries from "Libraries" folder? I'm using Visual Studio 2010 Premium.
To load an assembly from a specified subdirectory of the application's base directory requires a modification to the configuration file. e.g.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Libraries"/>
</assemblyBinding>
</runtime>
</configuration>See probing element[^] at msdn. The Assembly Fusion log viewer[^] will show all paths searched during assembly loading and is a useful tool to have running, especially if you make a mess of editing the config file. It's helped me out more than once! Alan.
-
Since that I have created about 15 separate libraries for the main exe, they are in the same folder as exe. I was thinking of putting those class libraries (DLLs) into a folder called "Libraries" in the main exe folder, so that the directory will look cleaner and organized. How can I do that so that the exe file can load libraries from "Libraries" folder? I'm using Visual Studio 2010 Premium.