my solution is using Nuget to update below items to latest version: - Microsoft.Net.Compilers - Microsoft.CodeDom.Providers.DotNetCompilerPlatformThen rebuilt the project. Since my project is a website so no *.csproj file.The error above appears when I tried to view a cshtml in browser.
The error fixed after the two items above updated to latest version.I am in VS2015 and windows7 SP1