This is a repo that demonstrates multi-targeting .NET projects, creates a set of platform-specific APIs on top (UI), then bring them back together into a .NET Standard compatible Xamarin.Forms project.
The solution allows you to write internal platform specific code, even expose platform-specific members to non-.NET Standard projects, and use platform-specific UI inside a .NET Standard Forms assembly.
All these things are accomplished using bait'n'switch, where the .NET Standard library is only used during compilation, but the application deployment instead deploys the platform specific DLLs.
NetStandardTests
- .NET Standard 2.0 Reference assembly (this is an empty dummy assembly for compilation against - it's never used at runtime)
- .NET Framework 4.6.1
- Windows Universal (UWP) build 16299
- Xamarin.iOS
- Xamarin.Android
NetStandardTests.UI.WPF
- Native WPF UI control library
NetStandardTests.UI.UWP
- Native UWP UI control library
NetStandardTests.UI.Android
- Native Android UI control library
NetStandardTests.UI.iOS
- Native iOS UI control library
NetStandardTests.Forms
- Xamarin.Forms UI Control library, wrapping above native UI Controls as a cross-platform .NET Standard assembly
None of this would be possible without Oren Novotny's awesome blogposts and nuget packages. Useful articles: