0
votes

I've created a core PCL library which can be used in both the xamarin.android,xamarin.iOS projects. I've been creating a xamarin package by using that PCL ,which I am going to upload into the xamarin component store as a library component.How should I add that PCL library for my xamarin.android/iOS sample projects to compile.Either as a DLL Reference or as a whole PCL project,so xamarin.component.exe can make the proper reference in xamarin package?

1
You could use your pcl project as reference, take a look: developer.xamarin.com/guides/cross-platform/… If this doesn't solve your problem, please be more specific :-) - Benedetto Del Greco
@BenDelGreco That's not my issue.I have been creating a component using a PCL library.I do not know how should I add that PCL into my xamrin.android/iOS projects.Either as a .dll reference as you have mentioned above or I should add the whole PCL project into my android/iOS projects.I am using xamarin component.exe to create the xamarin package.Some people say that the whole PCL project should be added.so that the component.exe can able to properly reference the PCL . - Saravanan
Just to be sure, you made two xamrin.android/iOS projects witch use your PCL as reference. Now you want to publish your 2 projects to the Components store and you are not sure on how to reference the PCL? Or do you want to publish only your PCL? - Benedetto Del Greco
@BenDelGreco I am going to publish only my PCL to the component store .But I should also include sample Android/iOS projects which references the PCL ,to demonstrate the usage of PCL to the component end user. - Saravanan

1 Answers

0
votes

How should I add that PCL library for my xamarin.android/iOS sample projects to compile.Either as a DLL Reference or as a whole PCL project,so xamarin.component.exe can make the proper reference in xamarin package?

Please refer to steps 5,6,7,8,9,10 of Xamarin Component Submission:

5: Within this folder create the "lib” and "samples” folders to complete your folder structure.

6: Within the "lib” folder create new folders for each platform you support.

7: Do the same for the samples folder.

8: Copy your components DLL’s into the relevant platform folder within the "lib” folder - Copy the xml files too if you want to include your documentation

9: Create a sample project for each supported platform in the relevant folder in "samples”.

10: Reference the DLL’s from the relevant folder in libs and then build your sample.

So, it is clear that you need to reference the dlls in relevant "lib" folder and build it