liyao20060101 发表于 2016-11-30 12:16:52

SQLite与.Net Framework 4.0的兼容…

  .net 开发者
  http://www.dotnetdev.cn/category/javascript/
  http://www.dotnetdev.cn/2010/03/sqlite与-net-framework-4-0的兼容性解决方案/
SQLite与.Net Framework 4.0的兼容性解决方案


2010年3月16日 分类:C#, 数据库

  我们使用vs2010开发基于SQLite的应用程序时,发现会报出兼容性异常如下:
  System.IO.FileLoadException: Mixed mode assembly is builtagainst version ‘v2.0.50727′ of the runtime
and cannot be loaded in the 4.0 runtime without additionalconfiguration information.
  我们只需要在应用程序配置文件configuration节点加入
1
2
3
4
<startup useLegacyV2RuntimeActiva<wbr>tionPolicy</wbr>="true">
<wbr><wbr></wbr></wbr><supportedRuntimeversion="v4.0"/>
<wbr><wbr></wbr></wbr><requiredRuntimeversion="v4.0.20506"/>
</startup>



  即可解决问题。允许旧的应用程序绑定到新的版本之上。
页: [1]
查看完整版本: SQLite与.Net Framework 4.0的兼容…