Difference between PCL and Shared Project in Xamarin
PCLs
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.
Shared Project
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.
Shared Project
Shared Projects (also sometimes called Shared Asset Projects) let you write code that is shared between multiple target projects including Xamarin applications.
They support compiler directives so that you can conditionally include platform-specific code to be compiled into a subset of the projects that are referencing the Shared Project. There is also IDE support to help manage the compiler directives and visualize how the code will look in each application.
If you have used file-linking in the past to share code between projects, Shared Projects works in a similar way but with much improved IDE support.
Comments
Post a Comment