Working with portable class libraries
A portable class library (PCL) is a C# library project that is able to be supported on multiple platforms including iOS, Android, Windows, Windows Store apps, Windows phone, Silverlight, and Xbox 360. PCLs have been an effort by Microsoft to simplify development across different versions of the .NET framework. Xamarin has also added support on iOS and Android for PCLs. Many popular cross-platform frameworks and open source libraries are starting to develop PCL versions such as Json.NET and MVVMCross.
To set up a shared project, perform the following steps:
Open Xamarin Studio and start a new solution.
Select a new Single View App under the Multiplatform | App section. Or in Visual Studio, Cross-platform | Blank App (Native Portable).
Name the app
ProductSearch
, and select Use Portable Library.Complete this new project wizard and Xamarin Studio will generate three projects:
ProductSearch
,ProductSearch.Droid
, andProductSearch.iOS
.Add the
Product
,ProductRepository...