I just installed VS 2015 Community RTM on Win7 64-bit.
I create a new MVC project targeting either the .NET Framework 4.5.1 or 4.5.2 using the corresponding template.
I run them on the local machine and they run fine.
However, when I change the target framework in project properties from 4.5.1 to 4.5.2 (or the other way around), I get the error shown below.
Reloading the project or restarting VS doesn't help.
Changing the language version unter Build => Advanced to "C# 5.0" doesn't solve the problem either.
Is this a bug?
Seems like the specified language version is not getting from the VS UI to the compiler command line.
_____________________________________________________________________________________________________________________________________________________
Compilation Error
Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1617: Invalid option '6' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default
Source Error:
[No relevant source lines] |
Source File: Line: 0
<div class="expandable">Show Detailed Compiler Output:</div> <div id="compilerOutputDiv">C:\Program Files (x86)\IIS Express> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\ab86a7ca\9447cc05_9ac4d001\System.Web.Optimization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.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:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\3a5fd52a\fe1de005_9ac4d001\System.Web.Mvc.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\4ec01510\6e387621_9ac4d001\mvc452.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:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\d21f1f2b\cf2dcf05_9ac4d001\System.Web.WebPages.Razor.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.Web.WebPages.Deployment\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.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:\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_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.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:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\5b520775\2a2b4106_9ac4d001\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.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:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\517d2319\377ff305_9ac4d001\Antlr3.Runtime.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\b132331e\aedfce05_9ac4d001\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.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\Microsoft.Web.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Web.Infrastructure.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:\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\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\0af4374b\7aafc905_9ac4d001\System.Web.Razor.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\b964c8b6\30c9f505_9ac4d001\WebGrease.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_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.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.Web.WebPages.Deployment\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\f5630b78\8d91ce05_9ac4d001\System.Web.Helpers.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\fe5a9f88\be06cf05_9ac4d001\System.Web.WebPages.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.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\assembly\dl3\cc0337ba\8b692306_9ac4d001\Newtonsoft.Json.dll" /out:"C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\App_global.asax.y7q4zs_7.dll" /D:DEBUG /debug+ /optimize- /warnaserror /w:4 /nowarn:1659;1699;1701;612;618 /langversion:6 /nowarn:1659;1699;1701 "C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\App_global.asax.y7q4zs_7.0.cs" "C:\Users\ckurz\AppData\Local\Temp\Temporary ASP.NET Files\vs\af543f55\865ca3e2\App_global.asax.y7q4zs_7.1.cs" Microsoft (R) Visual C# Compiler version 4.6.0081.0 for C# 5 Copyright (C) Microsoft Corporation. All rights reserved. This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240 error CS1617: Invalid option '6' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default |