C#编译版C#命令行编译 [英] C# compile version C# command line compilation

查看:73
本文介绍了C#编译版C#命令行编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用命令行编译


csc似乎停留在使用C#编译器版本5.我希望它使用版本7


<我检查了csc的配置源文件,即csc.exe,这是我在那里看到的代码


<? xml 版本 = " 1.0" ?>

解决方案

< 中的版本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

<?xml version ="1.0"?>

解决方案

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆