On my VS.NET 2015 development machine, the Razor views that use the nameof operator work like a charm.
When deploying to a Windows server, it fails to compile the CSHTML
According to this site, you need to reference the Roslyn compiler in your Web.config file to get C# 6 features to work in your razor views.
This can be achieved simply by installing the CodeDOM Providers for .NET Compiler NuGet package.
PM> Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform