发生此类问题是因为IDE与项目版本不匹配

解决方法:右键项目---》管理nuget程序包--》更新 Microsoft.Net.Compilers和DotNetCompilerPlatform包

相关文章: