I am using Visual Studio 2015 Community Edition with Xamarin. I have a Xamarin forms project. I now want to test adding a PCL and a shared library. I can see that the Solution -> Add -> New Project, shows me some templates. Listed here is a Class Library (Xamarin Forms) which must be the PCL. What I want to know is where is the Shared Class Library. Xamarin Studio for iOS appears to show these differently. I have a choice of creating a PCL or a shared library under a "Library" menu item. With Visual Studio, it is a lot more confusing. I can clearly see that there are templates for brand new projects for Blank App ( Portable ) and Blank app Shared, but this is not what I want. What I want is a library ( shared ). Where is this template?
0
votes
There is nothing like shared library. If you are using shared project it will be linked with your ios and Android projects. The code will be copied at build time to each platform. Whereas in PCL you have a class library which can be build standalone and can be included in your platform projects after it is compiled.
– Akash Amin
2 Answers
0
votes
0
votes
There are two ways to do this:
Step 1: Right Click on the solution -> Add -> New Project -> Click on the visual C# template -> Click on the Shared Project -> Name it.
Step 2: If you want more ease then on the Cross platform template you can opt for the Blank App(Shared) template it'll create all the three projects along with shared project.