Put Dlls in Directory other than the one having exe
-
MyProgExe.exe requires to call methods in dll files dll1.dll, dll2.dll, dll3.dll. Currenty my exe and dlls all are in the same directory as c:\MyProgFolder\Dll1.dll c:\MyProgFolder\Dll2.dll c:\MyProgFolder\Dll3.dll c:\MyProgFolder\MyProgExe.exe I'd like to put my dlls in separate directory as follows c:\MyProgFolder\Data c:\MyProgFolder\Libs\Dll1.dll c:\MyProgFolder\Libs\Dll2.dll c:\MyProgFolder\Libs\Dll3.dll c:\MyProgFolder\MyProgExe.exe How can I achieve this without using PInvoke? Also how can I setup my Compiler (SharpDevelop) to put my dlls in \Libs Folder instead of the same direcory as my executables? Thanks...
-
MyProgExe.exe requires to call methods in dll files dll1.dll, dll2.dll, dll3.dll. Currenty my exe and dlls all are in the same directory as c:\MyProgFolder\Dll1.dll c:\MyProgFolder\Dll2.dll c:\MyProgFolder\Dll3.dll c:\MyProgFolder\MyProgExe.exe I'd like to put my dlls in separate directory as follows c:\MyProgFolder\Data c:\MyProgFolder\Libs\Dll1.dll c:\MyProgFolder\Libs\Dll2.dll c:\MyProgFolder\Libs\Dll3.dll c:\MyProgFolder\MyProgExe.exe How can I achieve this without using PInvoke? Also how can I setup my Compiler (SharpDevelop) to put my dlls in \Libs Folder instead of the same direcory as my executables? Thanks...
Take a look at
AppDomain.AppendPrivatePath()
orAppDomainSetup.PrivateBinPath
.Regards, mav -- Black holes are the places where God divided by 0...