app.configのprobing要素でexeが参照するdllの位置を指定することができる
動作環境
・VS2005
・.NetFrameWork2.0
Testexe.exeがclass1.dllを参照しているケース
ディレクトリ構成
bin | |---Testexe.exe | |---Testexe.exe.config | |---dll |---class1.dll ←参照先DLL
※app.configファイルはexeと同じ名前とし、同じ階層に配置しておくこと
Test.exe.config
<?xml version="1.0" encoding="utf-8" ?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="dll" /> </assemblyBinding> </runtime> </configuration>