Where is System.Tuple in portable class libraries?

I don’t know, maybe I installed something incorrectly, but by targeting the C # class platform targeting the .NET for Windows Store apps, .NET Framework 4.5, Silverlight 4 and higher, Windows Phone 7 and higher , I I get errors that System.Tuple missing.

How could this be?

+6
source share
2 answers

Tuple[<...>] does not exist on Windows Phone 7, so you cannot use it if you are targeting this platform.

I just confirmed, and if you create PCL targeting:

  • .NET for Windows Store Applications
  • .NET Framework 4.5
  • Silverlight 4 and above

but not "Windows Phone 7 and higher", then it works fine, and you can use Tuple[<...>] .

For completeness, it also does not exist if you have turned on the Xbox 360.

+3
source

Microsoft.Bcl The NuGet package includes Tuple types for Windows Phone 7.5 and allows you to use them in a portable class library that focuses on WP7.5, SL4, Windows Store apps, and .NET 4 (or higher platforms).

In general, a complete list of portable APIs and their platforms: http://sdrv.ms/OVdfNc . However, this table does not contain information about what types we added for support through external tools (for example, the Microsoft.Bcl package).

+2
source

All Articles