The Xamarin.Essential how to work at netstandard ?

yang zhou 21 Reputation points
2021-10-17T03:24:49.283+00:00

Hello, i see xamarin.essential can work at netstandard of xamarin.form, but i see the source code, all are throw exception in the netstandard.share.cs, i know by ioc we can use interface to use platform implementation in the netstandard library, but xamarin.essential no interface, so i want know it how to work, i want create library to like this.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lex Li (Microsoft) 4,742 Reputation points Microsoft Employee
    2021-10-17T04:21:57.78+00:00

    That simply indicates you didn't go through the whole documentation like this,

    "Add the Xamarin.Essentials NuGet package to each project" is very important, as it allows platform specific projects (iOS, Android for example) to get the dependent assemblies with actual implementation, different from the assemblies for interfaces (code that only throws exceptions).

    Again, dig into the entire code base and documentation, not merely a class/file, and that helps you understand how it actually works.

    0 comments No comments

0 additional answers

Sort by: Most helpful