码迷,mamicode.com
首页 > 其他好文 > 详细

CS1617: 选项“6”对 /langversion 无效;必须是 ISO-1、ISO-2、3、4、5 或 Default

时间:2015-08-04 22:47:55      阅读:10811      评论:0      收藏:0      [点我收藏+]

标签:

今天用VS2015 新建了一个MVC项目  一运行就报这个错误  CS1617: 选项“6”对 /langversion 无效;必须是 ISO-1、ISO-2、3、4、5 或 Default

查看详细错误信息如下(注意红色文字: /langversion:6)

C:\Program Files (x86)\IIS Express> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\202c2dc7\15bae5b1_b7ced001\Microsoft.Owin.Security.Google.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\d986d339\dd58d2b1_b7ced001\Microsoft.Owin.Security.Facebook.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\6edd4214\af23c6b1_b7ced001\Microsoft.Owin.Host.SystemWeb.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\310df7bb\03654bb0_b7ced001\WebGrease.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\11a328a2\ea601eb0_b7ced001\Microsoft.Web.Infrastructure.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Web.PageInspector.Loader\v4.0_1.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Web.PageInspector.Loader.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\a03e25be\c4e10fb0_b7ced001\System.Web.WebPages.Deployment.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\c90a79f0\463eccb1_b7ced001\Microsoft.Owin.Security.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\6bf659b7\28cc10b0_b7ced001\System.Web.WebPages.Razor.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\32287575\cbcd22b0_b7ced001\System.Web.Mvc.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\77df798b\8ce4abb1_b7ced001\Microsoft.AspNet.Identity.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\a528d8a7\a181b5b1_b7ced001\Microsoft.AspNet.Identity.EntityFramework.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\baf55bfc\982780b2_b7ced001\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\86633596\213d42b0_b7ced001\Antlr3.Runtime.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\f73c1556\26bb32b1_b7ced001\EntityFramework.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\8fc9e967\95c1d8b1_b7ced001\Microsoft.Owin.Security.Cookies.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\3bd9efc2\8e9fb0b1_b7ced001\Microsoft.AspNet.Identity.Owin.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\3286340f\2cdcdeb1_b7ced001\Microsoft.Owin.Security.OAuth.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\8c100c1b\583033b1_b7ced001\EntityFramework.SqlServer.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\daf7a022\5aa5c0b1_b7ced001\Microsoft.Owin.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\51b1a9d2\067e10b0_b7ced001\System.Web.WebPages.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\6007dc0c\bf33f9b0_b7ced001\Newtonsoft.Json.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\a23f30c4\e975f3b1_b7ced001\Microsoft.Owin.Security.MicrosoftAccount.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\06c08773\2c080b94_bcced001\MvcMovie.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\d320b303\96ac03b0_b7ced001\System.Web.Razor.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\c7d2e085\a23cbab1_b7ced001\Owin.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\dd752b88\6f630ab0_b7ced001\System.Web.Optimization.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\4707f4f5\ff97ecb1_b7ced001\Microsoft.Owin.Security.Twitter.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\assembly\dl3\fe48adbb\82450fb0_b7ced001\System.Web.Helpers.dll" /out:"C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\App_global.asax.avkxmm6n.dll" /D:DEBUG /debug+ /optimize- /warnaserror /w:4 /nowarn:1659;1699;1701;612;618 /langversion:6 /nowarn:1659;1699;1701  "C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\App_global.asax.avkxmm6n.0.cs" "C:\Users\lizhaoyang\AppData\Local\Temp\Temporary ASP.NET Files\root\e4d07940\88f2ce54\App_global.asax.avkxmm6n.1.cs

再看错误提示:

error CS1617: 选项“6”对 /langversion 无效;必须是 ISO-1、ISO-2、3、4、5 或 Default

可以确定是编译时指定的langversion参数值无效,不支持。而且给列出了支持的参数,所以只需找到编译时赋参数值的地改过来即可,后来发先在config中可以指定编译时的参数

技术分享

然后按给出的值改成了Default 再次编译运行。搞定。

 

CS1617: 选项“6”对 /langversion 无效;必须是 ISO-1、ISO-2、3、4、5 或 Default

标签:

原文地址:http://www.cnblogs.com/ddxblog/p/4703287.html

(3)
(3)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!