Predefined type 'System.ValueTuple´2´ is not defined or imported
For .NET 4.6.2 or lower, .NET Core 1.x, and .NET Standard 1.x you need to install the NuGet package System.ValueTuple
:
Install-Package "System.ValueTuple"
Or using a package reference in VS 2017:
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
.NET Framework 4.7, .NET Core 2.0, and .NET Standard 2.0 include these types.
It's part of the .NET Framework 4.7
.
As long as you don't target the above framework or higher (or .NET Core 2.0
/ .NET Standard 2.0
), you'll need to reference ValueTuple
. Do this by adding the System.ValueTuple
NuGet Package