0
我不能在C#交互式窗口中使用元組;我得到以下錯誤:C#交互式不識別ValueTuple參考
(1,15): error CS8137: Cannot define a class or member that utilizes tuples because the compiler required type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' cannot be found. Are you missing a reference?
(1,15): error CS8179: Predefined type 'System.ValueTuple`2' is not defined or imported
(2,9): error CS0103: The name 'IsLiteralTypeName' does not exist in the current context
(2,47): error CS8179: Predefined type 'System.ValueTuple`2' is not defined or imported
(5,12): error CS8179: Predefined type 'System.ValueTuple`2' is not defined or imported
這即使我添加了一個參考值類型組件:
#r "D:\MyProject\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll"
我怎樣才能利用價值的元組從C#互動窗口?
添加NuGet包System.ValueTuple? –
@EmanuelPirovano如何爲C#交互式窗口添加Nuget包? –