Reputation: 199
I'm starting a new Xamarin.Forms project for my own App, I've to use this Plugin: Bluetoothle that's compatible only with .NET Standard 2.0, I already setting up my project and everything works fine.
My question is: it is advisable to use .NET Standard 2.0 with Xamarin.Forms now?
My fear is to have an incompatibility during the development process of my app. For example, I've tried to install Xamarin.Forms.GoogleMaps and a Warning compared:
Package 'Xamarin.Forms.GoogleMaps 2.3.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
So I want to ask you is anybody already using .NET Standard 2.0 with Xamarin and if you have some kind of problem with it.
Upvotes: 5
Views: 1171
Reputation: 39072
No, you can use .NET Standard with Xamarin.Forms quite safely. Most packages which display the warning you mentioned have previously targeted a Portable Class Library, which definitely had lower API surface than .NET Standard.
In most cases everything will work as expected as long as the library doesn't call some API that is unavailable or not implemented in .NET Standard. This however happens mostly just for some libraries that previously targeted the full .NET Framework are using some Windows-specific APIs.
The best advice then would be to test the app and all "corner" cases as much as possible, but you should be safe when using well supported PCL libraries.
Upvotes: 6