框架更改2.0到4.0 [英] framework change 2.0 to 4.0

查看:91
本文介绍了框架更改2.0到4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用的是基于版本2.0框架的类,我已将其复制到基于框架4构建的新项目中

进行更改函数

我在为该类创建实例对象时遇到错误





混合模式程序集是根据运行时的版本'v2.0.50727'构建的,如果没有其他配置信息,则无法在4.0运行时加载。



我怎么去进一步没有重新编译旧项目到4.0并反映更改?

Hi,
I am using a class built on version 2.0 framework, I have been copied that to a new project being built on framework 4
making out changes in functions
I have got an error when creating instance object for that class


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.

How would I go further without recompiling the old project to 4.0 and reflecting the changes?

推荐答案

如果你收到奇怪的错误信息,那么首先要做的就是google整个消息:

Google [ ^ ]通常,快速关注第一页链接就足以找到解决方案。



在这种情况下,它是解决它的第二个命中: http://stackoverflow.com/questions/245 5654 / what-additional-configuration-to-reference-a-net-2-0-mixed-mode [ ^ ]
If you get an "odd" error message, then the first thing to do is google the whole message:
Google[^] Normally, a quick follow of teh first page of links is enough to find a solution.

In this case it's the second hit that solves it: http://stackoverflow.com/questions/2455654/what-additional-configuration-is-necessary-to-reference-a-net-2-0-mixed-mode[^]


尝试在web.confing。



< startup uselegacyv2runtimeactivationpolicy =true>

< supportedruntime version = v4.0sku =。NETFramework,Version = v4.0>

< requiredruntime version =v4.0.20506>







你可以点击这里: http://stackoverflow.com/questions/6425707/mixed-mode-assembly-is-built-against-version-v2-0 -50727-of-the-runtime [ ^ ]
Try to in web.confing.

<startup uselegacyv2runtimeactivationpolicy="true">
<supportedruntime version="v4.0" sku=".NETFramework,Version=v4.0">
<requiredruntime version="v4.0.20506">


OR
you can click here : http://stackoverflow.com/questions/6425707/mixed-mode-assembly-is-built-against-version-v2-0-50727-of-the-runtime[^]


这篇关于框架更改2.0到4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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