This issue is very similar to:
I am using:
R# Ultimate 2017.2.2 or 2017.3.EAP9 (EAP9 used for all the screenshots below).
Targeting .NET Framework 4.6.1
Unfortunately, none of the answers in the previous posters' questions work. Every C# 6 or C# 7 feature used in Razor code is highlighted by R# Intellisense as being an unsupported C# 6.0 Language feature..... even string interpolation and null-propogation, much less any C# 7 things like inline out vars or System.Value.Tuples:
I have CodeDom 1.07 installed:
However, .CS files in the same solution have no issues showing the correct code without the red squigglies, including C# 7 features:
My web.config has the correct version listed:
<compiler language="c#;cs;csharp" extension=".cs"
Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4"
compilerOptions="/langversion:7 /nowarn:1659;1699;1701" />
... and my project is set to C# 7.0 as well:
Microsoft.Net.Compilers is installed as v2.3.2,
This happens on all Razor .cshtml files, whether in a Views folder coupled with a Controller, or inside an @function helper in the App_Code folder.
If I disable R#, the red squigglies go away.
If I create an isolated, new project, I do not get this error in Razor code, even if the new project is in the problem solution:
If I add a new Razor view to the troubled project, the error persists.
The trouble affects all existing projects in the solution.... but only in the text editor. The solution builds without a single error (or even a single warning!), and the Error List window shows 0 errors, 0 warnings. I can deploy and run the solution just fine. It is only Intellisense warnings within the text editor, put there by R#, that is the problem.... but it is a real problem because it is impossible to find true errors in the sea of red down the scroll bar.
I seem to have followed all the steps / solutions from the prior reports above, but cannot solve this.
I cannot provide the entire solution (it's dozens of projects). I would happily provide the web.config for both a troubled project, and for the "Test" I just added that doesn't present the error.
Any thoughts on why this might be happening, or how it can be corrected?