Visual Studio 2015 CTP 中没有 C# 6.0? [英] No C# 6.0 in Visual Studio 2015 CTP?

查看:25
本文介绍了Visual Studio 2015 CTP 中没有 C# 6.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在 Azure 上创建了一个新的 VM(使用库中 Azure 团队提供的图像)和 即将推出的 Visual Studio 2014 的 CTP 版本 昨天在网上出现以测试它,特别是为了使用新的 C# 6.0 功能.

I have just created a new VM on Azure (using the image provided by the Azure team from the gallery) with CTP version of the upcoming Visual Studio 2014 that appeared yesterday online to test it and especially to play around with new C# 6.0 features.

但是,它不提供开箱即用的 C# 6.0 支持,因为没有任何语言扩展(主构造函数、属性初始值设定项、安全导航操作符)在那里工作.

However, it does not provide support for C# 6.0 out of the box, for none of the language extensions (primary constructors, property initializers, safe navigation operator) work there.

MSDN 上的一篇博客文章 建议将以下内容添加到项目设置中:

A blog entry on MSDN suggests adding the following to project settings:

 <LangVersion>Experimental</LangVersion>

但这在我的控制台项目中没有任何改变.甚至 第二个链接中的示例代码根本无法编译.

But this changes nothing in my console project. Even the sample code from the second link doesn't compile at all.

我错过了什么吗?

推荐答案

CTP 中存在一个错误,其中 LangVersion 开关区分大小写.尝试改用 experimental.

There is a bug in the CTP where the LangVersion switch is case sensitive. Try using experimental instead.

这篇关于Visual Studio 2015 CTP 中没有 C# 6.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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