最近在使用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节点加入 <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> <requiredRuntime version="v4.0.20506" /> </startup> 即可解决问题。这样做可以允许旧的应用程序绑定到新的版本之上。