Search code examples
c#iosxamarinxamarin-studioxamarin.mac

Xamarin creating "Xamarin Form PCL" app


Hi I am relatively new to Xamarin, and I found this project type called PCL which imports all of the references I need. But when it gets built it doesn't seem to come with any platforms just the simple solution seen below in the picture. Therefore this means I cant build it to that platform as shown in the last image. Don't know if this is something i have done as in I have to create it myself.

enter image description here

enter image description here

No platforms as you can see above and below

enter image description here

Tell me if I am not explaining this correctly and I will try to clarify what is going on


Solution

  • A PCL is a Portable Class Library. And basically that is just it. A library, a DLL file.

    So in the project you created there is nothing to run, you haven't created an actual app.

    To do so, in the first screen choose in the left pane App instead of library and pick one from there. If I am not mistaken there is a PCL variant there as well, look in the Xamarin documentation for the differences in projects. This will create four projects for you;

    1. A PCL (like you have now, for your shared code)
    2. A iOS app
    3. A Android app
    4. A Windows Phone app

    Although you seem to be running from Mac OS, which means you won't be able to edit the Windows Phone app. You will need Windows for that.

    For more introduction have a look at these links: