问题升级的NHibernate SQLite的应用到.NET 4.0 [英] Problem Upgrading NHibernate SQLite Application to .Net 4.0
本文介绍了问题升级的NHibernate SQLite的应用到.NET 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用流利的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>
这篇关于问题升级的NHibernate SQLite的应用到.NET 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文