Compiler Error Message: CS1056: Unexpected character ‘$’,cshtml页面编译报错Compilation Error

.cshtml报错信息:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1056: Unexpected character '$'

 

一般这个问题是因为web.config中的有一节点被注释了要么就是缺失了,导致编译器没有按照最新的语法编译解析C#语言

解决办法是启用节点


   
     
     
   

 

 

切记要启用此节点



    
      
      
    
  
  

 

你可能感兴趣的:(ASP.NET,MVC,asp.net,mvc)