Reputation: 461
We have a shared PCL that uses the Xamarin.Mobile dll to read contact's from a user's device and show a subset of them in our application. Because the Android and iOS versions of the dll are different we are required to reference both in our shared PCL and then the OS-specific versions in their respective projects. The issue is that you cannot reference two dlls with the same name.
Is there a way to reference both dlls in the shared PCL using some kind of alias? Or is there a better way to implement this so that we can access contacts on different devices using Xamarin.Mobile in the same solution?
Upvotes: 2
Views: 476
Reputation: 98
You will be better off referencing Xamarin.Mobile in your platform specific projects:
If you want to abstract that functionality into a shared PCL, you can do so using a shared interface and injected (dependency injection) platform specific implementations.
Upvotes: 4