/langversion 的选项“4”无效;必须是 ISO-1、ISO-2、3 或 Default SystemFrameWorkV3

https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version

Edit the csproj file

You can set the language version in your .csproj file. Add an element like the following:

XMLCopy
<PropertyGroup>
   <LangVersion>latest</LangVersion> </PropertyGroup> 

The value latest uses the latest minor version of the C# language. Valid values are:

ValueMeaning
defaultThe compiler accepts all valid language syntax from the latest major version that it can support.
ISO-1The compiler accepts only syntax that is included in ISO/IEC 23270:2003 C# (1.0/1.2)
ISO-2The compiler accepts only syntax that is included in ISO/IEC 23270:2006 C# (2.0)
3The compiler accepts only syntax that is included in C# 3.0 or lower.
4The compiler accepts only syntax that is included in C# 4.0 or lower.
5The compiler accepts only syntax that is included in C# 5.0 or lower.
6The compiler accepts only syntax that is included in C# 6.0 or lower.
7The compiler accepts only syntax that is included in C# 7.0 or lower.
7.1The compiler accepts only syntax that is included in C# 7.1 or lower.
7.2The compiler accepts only syntax that is included in C# 7.2 or lower.
7.3The compiler accepts only syntax that is included in C# 7.3 or lower.
latestThe compiler accepts all valid language syntax that it can support.

The special strings default and latest resolve to the latest major (C# 7.0) and minor (C# 7.3) language versions installed on the build machine, respectively.

转载于:https://www.cnblogs.com/rgqancy/p/9557387.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值