无法使用功能"声明表达式",因为它不是 C# 6.0 语言规范的一部分



我正在尝试在Ubuntu Linux VPS上构建SLN文件。但是,我遇到了一堆错误。

networking/handlers/CreateGuildHandler.cs(42,77): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
networking/Client.cs(45,16): error CS1043: Invalid accessor body `=>', expecting `;' or `{'
networking/Client.cs(46,25): error CS1043: Invalid accessor body `=>', expecting `;' or `{'
networking/Client.cs(124,41): error CS1525: Unexpected symbol `when'
networking/Client.cs(124,43): error CS1525: Unexpected symbol `<operator>'
networking/Client.cs(142,74): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
networking/handlers/UsePortalHandler.cs(32,43): error CS1644: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
networking/handlers/PlayerShootHandler.cs(23,96): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
networking/handlers/CreateHandler.cs(27,107): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
realm/entities/vendors/MerchantLists.cs(114,99): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification

请问我可以得到一些帮助吗?我环顾四周,没有一个答案奏效。

编译器知道它的含义,但不允许您使用它们,这意味着您有一个合适的编译器,但是:项目本身设置为使用较低级别的语言版本。检查项目文件以查看是否显式指定了它,或者:如果缺少,请使用更高的语言版本添加新的<LangVersion>元素。

最新更新