You might have seemed something like following, your ASP.NET MVC solution build ok but getting error following compiler error when deploying to IIS local site or cloud web server. First, you know you have C# 6 or higher at your application, but not sure why it causes compile error during runtime. I have to spend some time to figure out what happens in my case, so I've added what I found out at here so hopefully, it is able to help someone else.
Microsoft (R) Visual C# Compiler version 4.7.2556.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.