Kept getting that error when running a fresh ASP.NET MVC application (straight out of VS 2015 Community) on a Windows 2008 Server machine.
Lots of people are running into it, so I wanted to post here .
Found a crazy easy workaround thanks to this guy: Expertdebugger.
Simply downgrade your language version from C# 6 to C# 5, like so:
<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">
<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=\"Web\" /optionInfer+">
<providerOption name="CompilerVersion" value="v4.0"/>
</compiler>
</compilers>
</system.codedom>
Change the langversion:6
towards the bottom from 6 to 5 - langversion:5
Fixed it for me. Thank him.