.net 开发者
http://www.dotnetdev.cn/category/javascript/
http://www.dotnetdev.cn/2010/03/sqlite与-net-framework-4-0的兼容性解决方案/
SQLite与.Net Framework 4.0的兼容性解决方案
我们使用vs2010开发基于SQLite的应用程序时,发现会报出兼容性异常如下:
System.IO.FileLoadException: Mixed mode assembly is built against version ‘v2.0.50727′ of the runtime
and cannot be loaded in the 4.0 runtime without additional configuration information.
我们只需要在应用程序配置文件configuration节点加入
1
2
3
4
|
<
startup
useLegacyV2RuntimeActiva<wbr>tionPolicy</wbr>
=
"true"
>
<wbr><wbr></wbr></wbr>
<
supportedRuntime
version
=
"v4.0"
/>
<wbr><wbr></wbr></wbr>
<
requiredRuntime
version
=
"v4.0.20506"
/>
</
startup
>
|
即可解决问题。允许旧的应用程序绑定到新的版本之上。