Portable Class Libraries

Creating Reusable Cross Platform Library Projects

PDF for offline use

Let us know how you feel about this

Translation Quality


These articles cover Xamarin's support for Portable Class Library (PCL) projects including creating and consuming PCL projects in Visual Studio for Mac and Visual Studio, as well as writing the shared code using Visual Basic in addition to C#.

Introduction to Portable Class Libraries

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 Visual Studio for Mac 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.

Portable Visual Basic.NET

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.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.