无效的选项' 6' for / langversion;运行后必须是ISO-1,ISO-2,3,4,5或Default

时间:2016-09-03 10:18:28

标签: asp.net-mvc web-config

我更改了我的项目的.NET版本,现在我收到了这个错误:

enter image description here

  

编译器错误消息:CS1617:无效选项' 6' for / langversion;   必须是ISO-1,ISO-2,3,4,5或默认

这是我的web.config:

  <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:5/nowarn:1659;1699;1701">
            <providerOption name="CompilerVersion" value="v4.0"/>
          </compiler>
          <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+">
            <providerOption name="CompilerVersion" value="v4.0"/>
          </compiler>
        </compilers>

有谁知道这意味着什么?

1 个答案:

答案 0 :(得分:0)

更改为compilerOptions

中的<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">
appsrc ! shmsink socket-path=/tmp/foo sync=true wait-for-connection=false