title: Unable to use interpolated strings in cshtml
body: <p>I am getting this annoying error when trying to use a simple interpolated string in my <code>cshtml</code> file:</p>
  
  <pre><code>@for (int i = 0; i &lt; ppTitles.Count; i++)
  {
      &lt;p&gt;@ResourceLibrary.Resources.GetString($"PP_Text_{i + 1}")&lt;/p&gt;
  }
  </code></pre>
  
  <blockquote>
    <p>Feature 'interpolated strings' is not available in C# 5.  Please use language version 6 or greater.  </p>
  </blockquote>
  
  <p>I have tried all of the solutions <a href="https://stackoverflow.com/questions/31844056/feature-interpolated-strings-is-not-available-in-c-sharp-5-please-use-languag">here</a></p>
  
  <ul>
  <li>Got the langversion in <code>web.config</code></li>
  <li>Tried surrounding the string with <code>@()</code></li>
  <li>Upgraded the project to <code>4.5.2</code></li>
  </ul>
  
  <p>and <a href="https://stackoverflow.com/questions/35686990/feature-interpolated-strings-is-not-available-in-c-sharp-5-please-use-languag">here</a></p>
  
  <ul>
  <li>Changed language version from <code>default</code> to <code>6</code></li>
  <li>Installed CodeDome with <code>Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform</code></li>
  </ul>
  
  <p>I have used string interpolation in other areas of the project (in regular <code>.cs</code> files) without any issue.</p>
  
  <p>What is going on here?</p>