可以通过安装Microsoft.CodeDom.Providers.DotNetCompilerPlatform程序包解决:
Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
转载自:https://www.cnblogs.com/simadi/p/8527018.html