Project DescriptionPortable 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.
That's it.
PclContrib currently provides the following assemblies:
Portable.RuntimeSystem.Net.WebUtility (for encoding/decoding HTML)
System.Diagnostics.Stopwatch
Extension 'Close' methods for IDisposable types
Portable.ReflectionProvides extension methods for retrieving a ICustomAttributeProvider from reflection objects, such as Type, MemberInfo, etc.
Portable.ComponentModel.AsyncSystem.ComponentModel.BackgroundWorker
System.ComponentModel.AsyncOperation
System.ComponentModel.AsyncOperationManager
Portable.Security.Cryptography System.Security.Cryptography.AesManaged
System.Security.Cryptography.HMACSHA1
System.Security.Cryptography.HMACSHA256
System.Security.Cryptography.SHA1Managed
System.Security.Cryptography.SHA256Managed
System.Security.Cryptography.Rfc2898DeriveBytes
Portable.Security.Cryptography.ProtectedData (.NET 4.x, Windows Store and Windows Phone 7.5 only)
System.Security.Cryptography.ProtectedData
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.