是否可以将C#2.0应用程序转换为C#4.0? [英] Is it posible to convert C#2.0 application to C#4.0?

查看:86
本文介绍了是否可以将C#2.0应用程序转换为C#4.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在VS 2010中运行C#2.0应用程序时,它会显示错误消息.

是否可以将C#2.0应用程序转换为C#4.0?

Hi All,

While running a C# 2.0 application in VS 2010 it display an error message.

Is it possible to convert C#2.0 application to C#4.0?

推荐答案

当您打开使用旧版Visual Studio 2010版创建的解决方案或项目时,您将可以通过解决方案/项目转换器运行,该转换器只会自动修改解决方案和项目文件.

由于生成的结果,由于过时的类型/成员,您可能会收到一些警告.

由于2008年之前的Visual Studio不是多目标的,因此您可能需要将目标Framework更改为v.4.0.您可以选择任何目标Framework版本,因为它们是向后兼容的.针对2.0的解决方案可以在Framework 4.0或3.5中轻松运行.

—SA
When you open a solution or a project created with older versions of Visual Studio with version 2010, you will be offered to run through solution/project converter which will only modify solution and project files, automatically.

As a result of a build you may get some warning due to obsolete types/members.

As Visual Studio prior to 2008 was not multi-target, you may need to change the target Framework to v.4.0. You can select any the target Framework version, they are backward-compatible. The solution targeted for 2.0 will be readily run in the Framework 4.0 or 3.5.

—SA


只需在项目属性中将目标框架从2.0更改为4.0.
Just change the Target Framework from 2.0 to 4.0 in the Project Properties.


这篇关于是否可以将C#2.0应用程序转换为C#4.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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