I have recently started creating a multi-platform PCL with all manner of views, effects and other Xamarin utilities for use in any number of projects. Because some of these have platform-specific code and I do not want to include Android dependencies on iOS, for example, I decided to make this target different frameworks.
When I build this library, it correctly creates two output folders where the dll in the monoandroid folder contains the implementations specific to Android, and the netstandard2.1 folder does not.
However, after adding a project reference to this PCL for my Sample project (which I keep in the same solution), it seems to always pick up the netstandard2.1 dll, instead of the Android one.
After using dotPeek to look into the dll placed in the bin folder of my Sample.Android project, I've confirmed that it's the one built for the netstandard TargetFramework.
What could be causing the Android project to pick up the wrong .dll? I have a suspicion is might be a limitation with Project References and that I might need to reference a NuGet package instead. That would be rather annoying for testing though...
Any help would be welcome.