使用Visual Studio部署应用时,报错如下
CSC : error CS1617: Invalid option '7.3' for /langversion; must be ISO-1, ISO-2, Default or an integer in range 1 to 6.
在Web.config文件中查找“langversion”,发现对应的配置是“DotNetCompilerPlatform”。
然后 在项目名称上“右键”—— “管理NuGet程序包”,在“更新”选项卡下找到“Microsoft.CodeDom.Providers.DotNetCompilerPlatform”。发现确实版本可以更新。
于是更新即可。