asp.net-core - 在 Visual Studio CTP2 的 ASP.VNext 项目中启用 C# 6

标签 asp.net-core c#-6.0

我已经安装了 Visual Studio CTP2 并创建了一个新的 ASP.Net Vext 项目。当我尝试使用 C# 6.0 功能时,它不起作用。我什至尝试了以下链接中的 stpes。

No C# 6.0 in Visual Studio 2015 CTP?

但即使在此之后,我也无法在 VNext 项目中使用 C# 6。请帮忙。

最佳答案

将此添加到您的 project.json:

“编译选项”:{
"languageVersion": "实验性的"
}

关于asp.net-core - 在 Visual Studio CTP2 的 ASP.VNext 项目中启用 C# 6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25106044/

相关文章:

c# - Null 条件运算符不能用于赋值?

c# - DbSet 查找总是返回 null

asp.net-core - 如何创建和访问Session .net core api?

c# - Asp.net 5 beta8/rc1, 502指定的CGI应用程序,Azure [解决方案]

c# - 测试自定义工厂中间件

c# - .NET 4.6 和 C#6 中是否集成了动态语言运行时 (DLR)?

c# - '$' 符号在 C# 6.0 中有什么作用?

c# - 在 VS2015 中以 .Net 4.5 为目标,但我可以使用 C# 6 功能吗?

c# - HttpGet 在 Mvc 核心 2.0 中返回 404

c# - 使用 C# 6 nameof 的隐式和显式类型