This question already has an answer here:

I am already using the latest C# 6.0 features, like the string interpolation, in my ASP.NET MVC web application.

However, when I try to use these features in my Razor views, cshtml files, I get a Compilation Error. In the specific case of string interpolation, I get something like CS1056: Unexpected character '$'.

My question is:

Is it possible to use C# 6.0 features in cshtml views as well? If so, how?

Related posts

Recent Viewed