0
votes

I Try to Install Microsoft.Identity.Client Nuget to my Xamarin.Forms Project. But every time i try to install the package I always get this error message:

Could Not install package ' Microsoft.Identity.Client 1.0341221-alpha'. You are trying to install this Package into a project that targets '.NetPortable,Version=v4.5,Profile=Profile259, but the package does not contain any assembly references or content files that are compatible with that framework for more iformation, conct the package author

What should I do here, I have already tried all version of the package, and try to install the package from Package Manager Console

1
error is very clear. which .Net version you're using?Ashish Srivastava
im using 4.5 versionTheodorus Agum Gumilang

1 Answers

2
votes

The error is very clear, the NuGet does not contain any target platforms that are supported in your PCL profile 259.

You should migrate your PCL to a .NET Standard library, at least version 1.1 to consume the NuGet package in your shared code. Alternatively, you could abstract it away with an Interface and Dependency Injection, which probably will be more time consuming.