C#编译版C#命令行编译 [英] C# compile version C# command line compilation
问题描述
我使用命令行编译
csc似乎停留在使用C#编译器版本5.我希望它使用版本7
<我检查了csc的配置源文件,即csc.exe,这是我在那里看到的代码
< 中的版本supportedRuntime
version = " v4.0.30319" /> 与CLR有关,这是最新的;但
csc.exe的当前配置与此大不相同。
您可以使用此cmd行知道csc.exe支持哪种C#语言版本:
csc.exe -langversion:?
如果您拥有的csc.exe不支持此类参数,那么它与VS2017无关。
•
I use command line compilation
csc seems to be stuck on using C# compiler version 5. I want it to use version 7
I checked the configuration source file for csc, that is csc.exe, and this is the code I see there
The version in <supportedRuntime version="v4.0.30319"/> is related to the CLR, which is up to date; but the current config for csc.exe is much different than that.
You can know which C# language version csc.exe supports, using this cmd line:
csc.exe -langversion:?
If csc.exe you have doesn't support such parameter, then, it is not related to VS2017.
•
这篇关于C#编译版C#命令行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!