首页 > 代码库 > Could not create the driver from NHibernate.Driver.SQLite20Driver

Could not create the driver from NHibernate.Driver.SQLite20Driver

使用NHibernate连接Sqlite语句,版本为.net3.5。 升级.net 4.0出现异常,提示”Could not create the driver from NHibernate.Driver.SQLite20Driver“。

方法1:去网上找一个.net 4.0 的兼容版本。

方法2:在app.config或者web.config中加上下面的配置,即可正常运行:

<configuration>  <startup useLegacyV2RuntimeActivationPolicy="true">    <supportedRuntime version="v4.0"/>  </startup></configuration>


  <startup  useLegacyV2RuntimeActivationPolicy="true">    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>  </startup>
 

 

Could not create the driver from NHibernate.Driver.SQLite20Driver