是否可以使用C#4.0与Visual Studio 2008? [英] Is it possible to use C# 4.0 with Visual Studio 2008?

查看:191
本文介绍了是否可以使用C#4.0与Visual Studio 2008?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很清楚Visual Studio 2010使用C#4.0。但现在我正在徘徊,如果我能够测试C#4.0的功能与Visual Studio 2008。

I'm pretty aware that Visual Studio 2010 works with C# 4.0. But now I was wandering if I'm able to test C# 4.0 features with Visual Studio 2008.

我做了一次,使用C#3.0与Visual Studio 2005黑客app.config文件。

I did that one time, using C# 3.0 with Visual Studio 2005 hacking the app.config file.

在VS2008中有人使用C#4.0吗?

Did anyone have any success using C# 4.0 in VS2008?

Net Framework 4.0测试版,重新启动,创建了一个新的WPF应用程序,选择了应用程序属性,但目标框架只能设置为Net Framework 3.5。

I've installed Net Framework 4.0 beta, rebooted, created a new WPF application, chosen Application properties, but the Target Framework can be set only to Net Framework 3.5.

推荐答案

否。你不能使用.NET 4.0与VS2008,你不能使用C#4.0的功能 - 这是完全相同的情况,试图使VS2005处理C#3.0。编辑器,Intellisense等只是不知道新的功能。

No. You can't use .NET 4.0 with VS2008, and you can't use the C# 4.0 features either - it's exactly the same situation as trying to make VS2005 cope with C# 3.0. The editor, Intellisense etc just don't know about the new features.

一个重要的方面是,即使它看起来像像Visual Studio是只是使用外部 csc.exe 编译器,它不是 - 。进程内编译器与它附带的Visual Studio的版本绑定,所以它只知道当时可用的语言功能。

One important aspect is that even though it looks like Visual Studio is just using the external csc.exe compiler, it isn't - there's another "in-process" one. That in-process compiler is tied to the version of Visual Studio it comes with, so it only knows about the language features which were available at the time.

这篇关于是否可以使用C#4.0与Visual Studio 2008?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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