指定System.Data.SQLite.dll释放目录的问题
自己做了个小程序,用到了SQLite数据库,将System.Data.SQLite.dll作为资源文件存入了Resources,并引用。
我的想法是程序一开始检测指定文件夹是否有System.Data.SQLite.dll文件,没有则释放一份,然后再进行引用,但如果直接在项目上右键添加引用,他就会在我检测之前进行引用,此时还没有释放System.Data.SQLite.dll到指定文件夹,我又不想DLL文件跟exe程序同目录,我试过添加App.config文件,但没有作用,不知道是不是我写的有问题
//App.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="数据文件夹勿删;bin;bin\Debug\数据文件夹勿删"/>
</assemblyBinding>
</runtime>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku = ".NETFramework,Version=v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
求教