Unable to return Tuple from a method using Visual Studio 2017 and C# 7.0

I Just ran through this page on Roslyn which describes the following steps to get this working:

  1. Start a C# project
  2. Add a reference to the System.ValueTuple package from NuGet (pre-release)

enter image description here

Following those steps, it is now working. But it is really very weird that we need to do that for every single project that we start! Hope this is fixed when we reach the Official release!


I started getting this error after I installed .Net 4.7 Framework, and changed my project to target .Net 4.7

ValueTuple is now included with .Net 4.7, so you don't have to reference the ValueTuple manually.

All I had to do to correct the compile error was remove the reference to System.ValueTuple from my project's references.


I got this error too after updating to .NET 4.7.2 and was able to fix it by re-installing nuget packages using:

Update-Package -Reinstall