/langversion 的选项“4”无效;必须是 ISO-1、ISO-2、3 或 Default SystemFrameWorkV3
2024-08-31 06:51:56
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:
Value | Meaning |
---|---|
default | The compiler accepts all valid language syntax from the latest major version that it can support. |
ISO-1 | The compiler accepts only syntax that is included in ISO/IEC 23270:2003 C# (1.0/1.2) |
ISO-2 | The compiler accepts only syntax that is included in ISO/IEC 23270:2006 C# (2.0) |
3 | The compiler accepts only syntax that is included in C# 3.0 or lower. |
4 | The compiler accepts only syntax that is included in C# 4.0 or lower. |
5 | The compiler accepts only syntax that is included in C# 5.0 or lower. |
6 | The compiler accepts only syntax that is included in C# 6.0 or lower. |
7 | The compiler accepts only syntax that is included in C# 7.0 or lower. |
7.1 | The compiler accepts only syntax that is included in C# 7.1 or lower. |
7.2 | The compiler accepts only syntax that is included in C# 7.2 or lower. |
7.3 | The compiler accepts only syntax that is included in C# 7.3 or lower. |
latest | The 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.
最新文章
- 2013 duilib入门简明教程 -- 事件处理和消息响应 (17)
- ios - block循环引用Demo示例
- 【WP8.1开发】基于应用的联系人存储
- flask 程序结构概括
- c语言_帮助别人
- web项目设计与开发——DBHelper2
- SCP和SFTP(都使用SSH。但SCP上传不能中断,而SFTP可以续传,这是最大区别)
- MongoDB基础知识 02
- 学习Emacs
- Spring中的Service/DAO/DTO
- otter双A同步配置
- TLD算法概述--学习理解之(一)
- 导出数据子集:带where条件的exp导出
- PAT1029:Median
- nmap简介和使用
- python中栈的单链表实现
- python学习-01
- 《图解HTTP》读书笔记(四:HTTP方法)
- 《SSO CAS单点系列》之 APP原生应用如何访问CAS认证中心
- idea 设置选中代码得背景颜色