How to place Assemblies or DLL's in a subfolder
-
I would like our project DLL’s placed into a sub-folder(\plugins). But when I try to run the application, it can’t find them. In the reference paths, I added a relative search path (.\plugins) and tried a micro path ($(TargetPath\plugins)). Neither seems to work. Unless the dll is in the same directory, I get an exception. The exceptions are the same. Can’t find file. Thanks :((
Programmer Glenn Earl Graham Austin, TX
-
I would like our project DLL’s placed into a sub-folder(\plugins). But when I try to run the application, it can’t find them. In the reference paths, I added a relative search path (.\plugins) and tried a micro path ($(TargetPath\plugins)). Neither seems to work. Unless the dll is in the same directory, I get an exception. The exceptions are the same. Can’t find file. Thanks :((
Programmer Glenn Earl Graham Austin, TX
By default, your application looks for its assemblies in one directory, so the exe and the dlls should be in the same directory. If you want to do something different then you have to take over the whole lifecycle of the assembly. In other words, you need to look at
Assembly.Load
.Deja View - the feeling that you've seen this post before.
-
By default, your application looks for its assemblies in one directory, so the exe and the dlls should be in the same directory. If you want to do something different then you have to take over the whole lifecycle of the assembly. In other words, you need to look at
Assembly.Load
.Deja View - the feeling that you've seen this post before.
After research I also found that you can give the X.exe an X.exe.config file that defines other sub-folders to search. This works for me. Thanks Glenn
Programmer Glenn Earl Graham Austin, TX