WinForm 实现主程序(exe)与其关联类库(*.dll)分开存放
开发环境:
Microsoft Windows 7 SP1
Microsoft.NET Framework 4.0 (x64)
Microsoft Visual Studio 2010
1. 首先, App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcConcurrent enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<publisherPolicy apply="yes"/>
<probing privatePath="lib"/><!--文件夹名-->
</assemblyBinding>
</runtime>
</configuration>
<configuration>
<runtime>
<gcConcurrent enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<publisherPolicy apply="yes"/>
<probing privatePath="lib"/><!--文件夹名-->
</assemblyBinding>
</runtime>
</configuration>
3. 最后, 把根目录下的所有DLL剪切到文件夹(lib)当中...
已测试通过!