Reference dlls in sub folders
-
Hello, Can someone tell me how i can tell my exe to look into sub folders if the dll being referenced isn't in the folder the exe is. I found the server config code but it doesn't work in the exe config. Thank you. Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
-
Hello, Can someone tell me how i can tell my exe to look into sub folders if the dll being referenced isn't in the folder the exe is. I found the server config code but it doesn't work in the exe config. Thank you. Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
-
Nathan, Use System.AppDomain.CurrentDomain.BaseDirectory to get root directory where EXE is. from rootdirectory you can fetch directories inside root directory. Regards, Sr
Thanks Sr...that doesn't work with references I have several apps that reference dlls that have controls in them. Typically those same dlls would be in the same folder as the exe. Because of "cluttering up" the main folder i wanted to move the dlls and their supporting files into a sub folder. I want the exe to look local and then go through sub folder(s) to look there as well before it comes back and tells me "file not found". There is a config setting that you can give to make it do that on the server. I just need to know what is the config setting to do that for the exe. Thank you...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
-
Thanks Sr...that doesn't work with references I have several apps that reference dlls that have controls in them. Typically those same dlls would be in the same folder as the exe. Because of "cluttering up" the main folder i wanted to move the dlls and their supporting files into a sub folder. I want the exe to look local and then go through sub folder(s) to look there as well before it comes back and tells me "file not found". There is a config setting that you can give to make it do that on the server. I just need to know what is the config setting to do that for the exe. Thank you...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
I amnot familiar with this type of operations but looking at the MSDN documentation; AppDomainSetup class contains a method PrivateBinPath which states; Gets or sets the list of directories under the application base directory that are probed for private assemblies. Don't know if that will help or not!
-
I amnot familiar with this type of operations but looking at the MSDN documentation; AppDomainSetup class contains a method PrivateBinPath which states; Gets or sets the list of directories under the application base directory that are probed for private assemblies. Don't know if that will help or not!
Thank you Dave...your privatepath gave me the right thing to lookup. If you add this to your exe config, it will look in sub folders as well as the base directory for files that you are referencing. In the example below, I want the exe to also prob sub folder controls. <configuration> <runtime> <asemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="controls"/> </assemblyBinding> </runtime> . . . </configuration>
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous