I don't know if maybe I have something installed incorrectly, but having made a C# Portable Class Library targeting .NET for Windows Store apps, .NET Framework 4.5, Silverlight 4 and higher, Windows Phone 7 and higher
, I'm getting errors that System.Tuple
is missing.
How could this be?
The Portable Class Library project enables you to write and build managed assemblies that work on more than one . NET Framework platform. You can create classes that contain code you wish to share across many projects, such as shared business logic, and then reference those classes from different types of projects.
NET Standard and PCLs: . NET Standard is a set of curated APIs, picked by Microsoft, PCLS are not. The APIs that a PCL contains is dependent on the platforms that you choose to target when you create a PCL.
PCL projects target specific profiles that support a known set of BCL classes/features. However, the down side to PCL is that they often require extra architectural effort to separate profile specific code into their own libraries.
Tuple[<...>]
doesn't exist in Windows Phone 7, so you can't use it if you are targeting that platform.
I've just validated, and if you create a PCL targeting:
but not "Windows Phone 7 and higher", then it works fine and you can use Tuple[<...>]
.
For completeness, it also doesn't exist if you include Xbox 360.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With