Message ="混合模式程序集是针对运行时的版本'v2.0.50727'构建的,如果没有其他配置信息,则无法在4.0运行时加载。在c#中 [英] 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." in c#

查看:113
本文介绍了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。修改后的项目属性:

生成序列化程序集=关闭

但在执行此操作后仍然面临同样的问题。请帮帮我..

谢谢

解决方案







你应该用SQLite DLL ver 4.0替换SQLite DLL v2.0下载这些链接的SQLite ver 4.0:



SQLite ver 4.0 32 bit

SQLite ver 4.0 64 bit



获取更多信息请查看 SQLite Org。



我建议你阅读我的文章也许它可以改变你的解决方案;-)

构建自己的通用数据访问层:第二部分 [ ^ ]



最好的问候。






<前lang =text>我找到了在谷歌搜索3-4小时之后解决这个问题。我添加了以下
< startup selegacyv2runtimeactivationpolicy =true>
< supportedruntime version =v4.0sku =。NETFramework,Version = v4.0,Profile = Client/>
< / startup>



如果这不能解决您的问题,那么 - >在项目参考中右键单击System.Data.SQLite - >选择属性 - >检查运行时版本 - >如果它是v2.0.50727那么我们就知道问题了。

问题是: - 你有2.0版本的SQLite DLL。

解决方案是: - 您可以从Project引用中删除System.Data.SQLite,然后从以下链接下载最新版本的DLL并添加最新版本DLL引用的引用然后它将工作。



http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki


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

解决方案

Hi


You should replace SQLite DLL v2.0 with SQLite DLL ver 4.0 download SQLite ver 4.0 of these links:

SQLite ver 4.0 32 bit
SQLite ver 4.0 64 bit

for getting more information please look at SQLite Org.

and I suggest to you read my article maybe it can change your solution ;-)
Build Your Own Generic Data Access Layer: Part II[^]

Best Regards.


Hi,

I found a way around this after 3-4 hours of googling. I have added the following 
<startup selegacyv2runtimeactivationpolicy="true">
  <supportedruntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>


If this doesn't solve your problem then--> In the Project References Right Click on System.Data.SQLite--> Select Properties--> Check the Run-time Version --> If it is v2.0.50727 then we know the problem.
The Problem is:- you are having 2.0 Version of SQLite DLL.
Solution is:- You can delete the System.Data.SQLite from the Project references and then download the latest version of DLL's from the following link and add the reference of the latest version DLL reference then it will work.

http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki


这篇关于Message =&quot;混合模式程序集是针对运行时的版本'v2.0.50727'构建的,如果没有其他配置信息,则无法在4.0运行时加载。在c#中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆