由网友(我爱你的不爱)分享简介:我用流利的NHibernate的1.0 RTM和System.Data.SQLite 1.0.65是在.NET 3.5中正常工作WPF应用程序。当我尝试将它升级到.NET 4.0编译的一切,但我得到一个运行时错误的最里面的例外情况是这样的:I have a WPF Application using Fluent N...
我用流利的NHibernate的1.0 RTM和System.Data.SQLite 1.0.65是在.NET 3.5中正常工作WPF应用程序。当我尝试将它升级到.NET 4.0编译的一切,但我得到一个运行时错误的最里面的例外情况是这样的:
I have a WPF Application using Fluent NHibernate 1.0 RTM and System.Data.SQLite 1.0.65 that works fine in .Net 3.5. When I try to upgrade it to .Net 4.0 everything compiles but I get a runtime error where the innermost exception is this:
`The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found.`
该项目所做的唯一变化是切换目标框架4.0。
The only change made to the project was switching the Target Framework to 4.0.
推荐答案
您需要使用一个版本的SQLite是的与.NET 4.0 兼容。您也可以尝试把这个在你的app.config:
You need to use a version of SQLite that is compatible with .NET 4.0. You might also try putting this in your app.config:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
</configuration>
相关推荐
最新文章