将C#.NET 2.0转换为4.0 [英] Converting c# .net 2.0 to 4.0

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

问题描述

大家好,我很高兴,
我的项目在.net 2.0(Visual Studio)中,我将其更改为.net 4.0.更改项目后
到4.0,我得到大约800个错误.有人可以告诉我一个简短的想法,为什么会这样
这么多错误.
*预先感谢*

Hi all, I am ARUN,
My project is in .net 2.0(Visual Studio),I changed it to .net 4.0. After changing the project
to 4.0, I get around 800 errors. can some one tell me a breif idea why there is
so many errors.
* Thanks in Advance *

推荐答案

太糟糕了.现在修复它们!下次程序清晰,没有任何警告.
说真的:我从来没有听说过这样的事情.我的大量代码从2.0转换而来,没有任何抱怨.您只会收到一些过时"的警告.您所做的事情根本上是错误的.

我希望您打开为.NET 2.0创建的同一项目,并在使用VS 2010打开时进行转换吗?您确定所有消息都是编译错误,而不是警告?您能否隔离一个简单样本以显示2-3个错误并将其发布?

谢谢.
—SA
Too bad. Now fix them! Next time program clearly, without a single warning.
Seriously: I never heard of such things. A huge mass of my codes converted from 2.0 without a single complain. You only could receive some "obsolete" warnings. You''re doing something fundamentally wrong.

I hope you opened the same very project you created for .NET 2.0 and converted when opened with VS 2010? Are you sure all messages are compilation errors, not warnings? Could you isolate a minimalistic sample to show 2-3 errors and post it?

Thank you.
—SA


运行一次.Net 4.0程序,以确保正确安装了VS2010.

然后,正如SAKryukov前面提到的,在VS2010中打开.Net 2.0项目/解决方案,VS2010应该会自动为您进行转换(然后将显示一个报告,以显示转换过程中遇到的所有错误/问题).
Run a .Net 4.0 program once to make sure VS2010 has been installed correctly.

Then as mentioned by SAKryukov earlier, open the .Net 2.0 project / solution in VS2010 and VS2010 should automatically do the conversion for you (a report will then be displayed to show all errors / issues faced during conversion).


这篇关于将C#.NET 2.0转换为4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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