Using an interpolated string in a .cshtml view is giving the following intellisense error: Feature 'interpolated strings' is not used in C#5. Please use language version 6 or greater.
This and other C#7 language features are working in compiled code (.cs files).
As you can see below, the latest major version is C#7.
According to a comment in this question, "default" means "latest major version".
So why the error? Also, why doesn't it show "Latest Major Version" and "Latest Minor Version" as separate list options, as I have seen in many online examples?
UPDATE:
I finally managed to get string interpolation working in my views by installing the CodeDom providers package (The Microsoft.Net.Compilers package is related to Msbuild. The CodeDOM Providers package is related to ASP.NET and other apis that compile at runtime hence why cshtml files will show errors if this is not installed even if the latest language version is selected for msbuild). This automatically added the following to my web.config:
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
Ref: C# 6.0 Features Not Working with Visual Studio 2015
Upgrading to MVC6 would also have fixed it I believe.