Portable Class Libraries Contrib (PclContrib) provides portable adapters and APIs that help bridge the gap between different .NET platforms when using the new Portable Class Library feature. This makes it easier to convert existing platform-specific
projects over to use portable APIs.
The Portable Class Library feature, available as an
add-on for Visual Studio 2010
and in the box for Visual Studio 2012, enables you to share common code between platforms using a single "portable" project.
When converting existing projects over to portable projects, you will likely run into APIs that aren't available because they are not provided by every platform. This is where PclContrib comes in; it provides platform-agnostic versions and adapters of these
APIs enabling them to be consumed by portable projects.
Using PclContrib is easy:
- From your 'portable' project, add a reference to Portable.Runtime, and optionally one or more of the Portable.* assemblies from below
- From .NET Framework (WPF, Windows Forms, or ASP.NET) projects, add a reference to Portable.Desktop
- From Silverlight projects, add a reference to Portable.Silverlight
- From Windows Phone projects, add a reference to Portable.Phone
- From Windows Store apps, add a reference to Portable.Store.
PclContrib currently provides the following assemblies:
System.Net.WebUtility (for encoding/decoding HTML)
Extension 'Close' methods for IDisposable types
Provides extension methods for retrieving a ICustomAttributeProvider from reflection objects, such as Type, MemberInfo, etc.
(.NET 4.x, Windows Store and Windows Phone 7.5 only)
We will continue to add support for new APIs as we find more gaps. If you would like to see something added, feel free to
file a bug
Also, check out our frequentely asked questions