Reputation: 8095
With the introduction of the Portable Class Library, developers can release a single library which is compatible across multiple platforms. The down-side to this is that the PCL must reduce itself to the lowest common set of classes which are compatible across ALL the specified platforms.
If you want to play to the strengths and functionality of specific platforms, (or if you want access to classes which only exist in certain platforms), I assume you have to do one of the following:
My question is: are those the only two options? Is there a clearly "better" option?
Upvotes: 4
Views: 588
Reputation: 4010
check out http://blogs.msdn.com/b/rxteam/archive/2012/03/12/reactive-extensions-v2-0-beta-available-now.aspx specifcally the section "Towards a Portable Library world". Rx targets a lot of different runtimes so it's a good example use case. They have generally done what you suggest as option 1 and use NuGet to manage a lot of the distribution.
NuGet 2.1 is making changes to help in this endeavor: http://nuget.codeplex.com/discussions/391121
Your second suggestion is how MVVM light does it per http://blogs.msdn.com/b/dsplaisted/archive/2012/08/27/how-to-make-portable-class-libraries-work-for-you.aspx except there's no reason to name all the assemblies the same.
i'm not sure if there are reliable or useful alternatives.
Upvotes: 1