本文介绍了Message ="混合模式程序集是针对运行时的版本'v2.0.50727'构建的,如果没有其他配置信息,则无法在4.0运行时加载。在c#中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
i正在开发一个应用程序,我正在为我的数据库使用SQLite连接。连接到我的数据库时,它给出了以下错误: -
Message =混合模式程序集是针对运行时版本'v2.0.50727'构建的,如果没有其他配置信息,则无法在4.0运行时加载。
我在网上搜索,发现我在我的代码中添加了两个不同的解决方案:
1.在我的app.config文件中添加:
< startup useLegacyV2RuntimeActivationPolicy = true >
< supportedRuntime v ersion = v4.0 sku = 。NETFramework,Version = v4 .0 / >
< / startup >
2。修改后的项目属性:
生成序列化程序集=关闭
但在执行此操作后仍然面临同样的问题。请帮帮我..
谢谢
解决方案
Hi All, i am working on one app in which i am using SQLite connectivity for my database.while connecting to my database it is giving me below error :- "Message = "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." I searched on web and found below two different solutions which i have added in my code : 1. Added in my app.config file : <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> 2. Modified project property: "generate serialization assembly = Off" but after doing this still i am facing same issue. Please help me out.. Thanks
解决方案
这篇关于Message ="混合模式程序集是针对运行时的版本'v2.0.50727'构建的,如果没有其他配置信息,则无法在4.0运行时加载。在c#中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!