No C# 6.0 in Visual Studio 2015 CTP?

ⅰ亾dé卋堺 提交于 2019-12-17 22:46:31

问题


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.

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.

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.

Do I miss something?


回答1:


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



来源:https://stackoverflow.com/questions/24066584/no-c-sharp-6-0-in-visual-studio-2015-ctp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!