Portable Class Libraries
Creating Reusable Cross Platform Library Projects
- PDF for offline use:
Let us know how you feel about this.
These articles cover Xamarin's support for Portable Class Library (PCL) projects including creating and consuming PCL projects in Xamarin Studio and Visual Studio, as well as writing the shared code using Visual Basic in addition to C#.
Portable Class Libraries allow you to write code and produce libraries that can be shared across mulitple platforms including Xamarin.iOS, Xamarin.Android and Windows Phone. Portable Class Libraries (PCLs) can be created in both Xamarin Studio and Visual Studio, and then referenced in each platform-specific project to allow code to be easily shared. This document explains a little about how PCLs work and shows how to create and consume them in cross-platform mobile apps.
Visual Studio supports the creation of Portable Class Libraries using Visual Basic.NET which can then be incorporated into Xamarin applications. This article shows how to create a new Visual Basic PCL and then use it in a sample Xamarin.iOS, Xamarin.Android and Windows Phone application.