不支持具有嵌入式引用的类型
Types with embedded references are not supported
我在 vs 2017 中尝试 运行 Squidex CMS 项目时遇到此错误。
我已经安装了`Microsoft .NET Core SDK 2.1.302
Severity Code Description Project File Line Suppression State
Error CS0619 'ReadOnlySpan' is obsolete: 'Types with embedded references are not supported in this version of your compiler.' Squidex.Domain.Apps.Core.Operations C:\Users\nithin.bc\Downloads\squidex-master\squidex-master\src\Squidex.Domain.Apps.Core.Operations\HandleRules\RuleEventFormatter.cs 82 Active
这是存在错误的代码部分
var cp2 = new ReadOnlySpan<char>(ContentPlaceholderStartNew);
var cp1 = new ReadOnlySpan<char>(ContentPlaceholderStartOld);
Span<T>
、ReadOnly<Span>
等是最近才引入的,并使用 C# 7.2 中引入的新 ref struct
(请参阅此 MSDN Blog: Welcome to C# 7.2 and Span and CSharp Docs: Reference semantics with value types)语言功能。
C# 7.2 需要 Visual Studio 2017.5 (15.5) 附带的更新版本的编译器。为了编译需要 C# 7.2 语言功能的项目,您必须安装 Visual Studio 的这个(或更新的)版本。
我在 vs 2017 中尝试 运行 Squidex CMS 项目时遇到此错误。 我已经安装了`Microsoft .NET Core SDK 2.1.302
Severity Code Description Project File Line Suppression State Error CS0619 'ReadOnlySpan' is obsolete: 'Types with embedded references are not supported in this version of your compiler.' Squidex.Domain.Apps.Core.Operations C:\Users\nithin.bc\Downloads\squidex-master\squidex-master\src\Squidex.Domain.Apps.Core.Operations\HandleRules\RuleEventFormatter.cs 82 Active
这是存在错误的代码部分
var cp2 = new ReadOnlySpan<char>(ContentPlaceholderStartNew);
var cp1 = new ReadOnlySpan<char>(ContentPlaceholderStartOld);
Span<T>
、ReadOnly<Span>
等是最近才引入的,并使用 C# 7.2 中引入的新 ref struct
(请参阅此 MSDN Blog: Welcome to C# 7.2 and Span and CSharp Docs: Reference semantics with value types)语言功能。
C# 7.2 需要 Visual Studio 2017.5 (15.5) 附带的更新版本的编译器。为了编译需要 C# 7.2 语言功能的项目,您必须安装 Visual Studio 的这个(或更新的)版本。