Questions tagged «asp.net-mvc-5.2»

7
错误/ langversion的选项'6'无效;必须为ISO-1,ISO-2、3、4、5或默认值
我正在尝试以.NET 4.6为目标,并通过将C#语言版本更改为6来利用最新的C#版本。 但是,在编译过程中出现此错误: 错误/ langversion的选项'6'无效;必须为ISO-1,ISO-2、3、4、5或默认值 如果我将/langversion:6Web.Config中的设置更新为5,则可以使用, <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"> 但是,如何解决此问题而不求助于较低语言版本? 我正在使用Visual Studio 2015社区版,并且还手动安装了.NET Framework 4.6,以防Visual Studio 2015默认情况下未安装它。 该项目是Visual Studio 2015创建的标准ASP.NET MVC模板项目。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.