xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
541 stars 351 forks source link

Xamarin.auth problem in .NET MAUI #480

Open EURedBoy opened 1 year ago

EURedBoy commented 1 year ago

Xamarin.Auth Issue

IF BUG, INCLUDE THIS PART:

Version

Steps to reproduce

  1. Install Xamarin.Auth
  2. Run the project

Platform:

Expected behaviour

Tell us what should happen I log in with an online service and get the token

Actual behaviour

After installing the xamarin.auth nuget package, i tried to compile the project but it says: Error MSB4062: non è stato possibile caricare l'attività "Xamarin.Android.Support.BuildTasks.VerifyVersionsTask" dall'assembly /Users/alex/.nuget/packages/xamarin.android.support.annotations/28.0.0.1/build/monoandroid90/Xamarin.Android.Support.BuildTasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Verificare che la dichiarazione sia corretta, che l'assembly e tutte le relative dipendenze siano disponibili e che l'attività contenga una classe pubblica che implementa Microsoft.Build.Framework.ITask. (MSB4062)

Tell us what happens instead Can you also include a screen shot?

image
poorankharol commented 10 months ago

same

JohnOliver-MyXplor commented 8 months ago

This seems to be only an issue with the 1.7.0 version of the package. Steps to Replicate (Using Visual Studio 2022)

  1. Create Android Application
  2. Add NuGet Package Xamarin.Essentials version 1.8.1
  3. Add NuGet Package Xamarin.AndroidX.Arch.Core.Runtime version 2.2.0.6
  4. Add NuGet Package Xamarin.Auth version 1.7.0.

After the auto build completes, the error MSB4044 The "VerifyVersionsTask" task was not given a value for the required parameter "TargetApiLevel". is returned.

Down-grading Xamarin.Auth to version 1.6.0.4 resolves the error.

poorankharol commented 8 months ago

I have now migrated from Xamarin to .NET SDK format so I have to forcefully remove Xamarin.Auth nuget from the project and use Microsoft.Identity.Client