1

When compiling a Razor View in my unit test project, I encounter this string interpolation error:

Unexpected character '$'

I have looked at this thread String interpolation in a Razor view? and followed the steps in the answers to install the https://www.nuget.org/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/ Nuget package and modify my app.config file accordingly but I am still getting the error.

My language version is set to 'automatically selected based on framework version' and is greyed out and I am unable to change, and the project is using MVC 5.

Does anyone know how to solve this issue? The Stack Overflow question I linked to earlier is over 5 years old so I wonder if there's some sort of update?

Jordan1993
  • 864
  • 1
  • 10
  • 28

0 Answers0