Feature 'interpolated strings' is not available in C# 5. Please use language version 6 or greater.

后端 未结 3 1350
南笙
南笙 2021-01-17 14:29

The following line does not compile when I put in a Razor View.

var extPropLookupNameCompania = $\"extension_{SettingsHelper.ClientId.Replace(\"-\", \"\")}_{         


        
3条回答
  •  逝去的感伤
    2021-01-17 15:12

    The key is to see the compilerOptions="/langversion:6 portion of the following in your web.config. Without it I got errors trying to use string interpolation inside a .cshtml file.

      
        
          
          
        
      

提交回复
热议问题