Compile errors when using C# 7 features in new VS Studio 2017 ASP.NET MVC 5.2.3 project

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 05:28:17

Thanks to Panagiotis and Tetsuya. It was the version of c#.

As a reference to this question, you have to do three things:

  1. Uninstall "Microsoft.CodeDom.Providers.DotNetCompilerPlatform" via Nuget Package Manager and reinstall the newest version (currently the 1.0.4)
  2. After this, update Microsoft.Net.Compilers to the newest version (currently 2.2.0)
  3. Change the c# language via project "properties < build < advanced" to version 7.

done.

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