将NHibernate SQLite应用程序升级到.Net 4.0时出现问题

将NHibernate SQLite应用程序升级到.Net 4.0时出现问题,.net,nhibernate,sqlite,fluent-nhibernate,.net,Nhibernate,Sqlite,Fluent Nhibernate,我有一个WPF应用程序,它使用Fluent NHibernate 1.0 RTM和System.Data.SQLite 1.0.65,在.Net 3.5中运行良好。当我尝试将其升级到.Net 4.0时,所有内容都会编译,但我遇到一个运行时错误,其中最内部的异常是: `The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found.` 对项目所做的唯一更改是

我有一个WPF应用程序,它使用Fluent NHibernate 1.0 RTM和System.Data.SQLite 1.0.65,在.Net 3.5中运行良好。当我尝试将其升级到.Net 4.0时,所有内容都会编译,但我遇到一个运行时错误,其中最内部的异常是:

`The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found.`

对项目所做的唯一更改是将目标框架切换到4.0。

您需要使用一个版本为的SQLite。您也可以尝试将其放在app.config中:

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


如果回答无效,请检查您是否有64位系统,如果有,请右键单击项目->属性->构建->将平台目标设置为x86并重新构建

将其放入app.config已修复。重复: