环境,Path 添加 C:\Windows\Microsoft.NET\Framework64\v4.0.30319
使用CSC编译
出错:
This compiler is provided as part of the Microsoft ® .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240
寻找Roslyn下的 csc.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn
改为Path
解决!