Classic ASP.NET Web Forms project, originally done in DotNet 2 and upgraded throughout the years (now on DotNet 4.7 with - ostensibly - C# 7). A real mess, but something I inherited.
I had been working with C# 6 under DotNet 4.6.2 up until a while ago, and things were working well. Unfortunately in a series of DotNet version swaps that were done in an attempt to figure out why certain (other) things weren't working, VS 2015 Community suddenly lost the hint that it was working with C# > 5, and is suddenly complaining about code (string interpolation, etc.) not being valid C# 5.
It compiles just fine with C# >6 features, so it is clear that the compiling works, but VS thinks I am still using C# < 6.
I had installed the Microsoft.CodeDom.Providers.DotNetCompilerPlatform
a long time ago when I moved to DotNet 4.5.2 and C# 6. I did not use the menu option (forgot about that one); I installed it directly from NuGet. Tried force-reinstalling it, no change. Tried deleting the packages folder and restoring packages, also didn't help.
I do not have an "Advanced" button on the Build section of my property pages. Please don’t that suggestion, as it is useless to me.
My Property Pages for this Project/Solution:
My Web.Config C# entry (nicely exploded):
<system.codedom>
<compilers>
<compiler
language="c#;cs;csharp"
extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4"
compilerOptions="/langversion:7 /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.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4"
compilerOptions="/langversion:15 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>
</system.codedom>