Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use netstandard 2.1 with xamarin Android?

I am running Visual Studio 2019 preview and I have the Android preview sdk installed (9.0.99) But when I try to build a xamarin forms project with a library set to netstandard 2.1. I still het a compatibiliteit error with monodroid. What am I missing? Been searching quite a bit and found something about a mono 2019-06 I believe, but no info on how to get it.

like image 732
John Avatar asked Jul 13 '19 10:07

John


People also ask

Which version of Xamarin will implement the new standard framework?

In Microsoft's Announcing .NET Standard 2.1 blog post it was announced that Standard 2.1 will be implemented by .NET Core 3.0 and upcoming versions of Xamarin, Mono, and Unity (and not the legacy .NET Framework).

Will there be issues with Xamarin forms if we use iOS/Android?

We are starting new mobile app development for iOS and Android, So should we use .NET Core 3.1 or 5.0. As 5.0 released recently, will there be issues with Xamarin. will there be issues with Xamarin. No, xamarin forms use .Net Standard 2.0 or .Net Standard 2.1 like this screenshot.

How do I target a library using the netstandard Compact Framework?

You can target the .NET Standard framework using the netstandard compact TFM (for example, netstandard1.4). Libraries that are intended to run on multiple implementations of .NET should target this framework. For the broadest set of APIs, target netstandard2.0 since the number of available APIs more than doubled between .NET Standard 1.6 and 2.0.

How do I target netstandard in Java?

The most common way to target netstandard is by referencing this metapackage. It describes and provides access to the ~40 .NET libraries and associated APIs that define .NET Standard. You can reference additional packages that target netstandard to get access to additional APIs.


1 Answers

This github document shows that Xamarin Android support NS2.1 since version 10:

enter image description here

So if you use at least Visual Studio 16.3 you can use .Net Standard 2.1 in Xamarin Android apps.

like image 186
magicandre1981 Avatar answered Sep 21 '22 01:09

magicandre1981