Source: The Bait and Switch PCL Trick
I was sure I’ve already blog about it but, apparently, it’s not the case. This post is about a trick to use PCL: you provides a fake implementation in PCL and real implementations, using platform dependent code, for each supported platforms. Then you combine all this implementations in one nuget package.
Doing this way, this nuget package is usable in PCL but fake implementation will never be used. This trick is based on the fact that final application is never PCL and that nuget rules will provides the more specific variant.