码迷,mamicode.com
首页 > 数据库 > 详细

Could not create the driver from NHibernate.Driver.SQLite20Driver

时间:2014-12-30 18:57:23      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:

使用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

标签:

原文地址:http://www.cnblogs.com/vonly/p/4194123.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!