Using “nameof” operator in Razor views

后端 未结 2 2065
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 03:21

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

2条回答
  •  失恋的感觉
    2021-02-05 04:00

    Make sure in your file "web.config" the node system.codedom exists.

    
        
          
          
        
     
    

    And you'd reference the package Microsoft.CodeDom.Providers.DotNetCompilerPlatform.

提交回复
热议问题