0
votes

I’m trying to use the latest version of ADAL (v3.13.5) in a Xamarin Forms app, using the guidance and sample published here:

http://www.cloudidentity.com/blog/2015/07/22/using-adal-3-x-with-xamarin-forms/

I’m noticing, though, that I can’t install ADAL v3.x in the UWP project of the Xamarin Forms solution. I’ve pasted the errors I’m getting in the output below.

I’ve also noticed the same issue when I try to install ADAL v3.x in a simple UWP solution as well. It looks like v2.28.2 is the latest version of ADAL that I can install in any UWP project. Is there a way to work around this so that I can implement the same version of ADAL, and therefore the same authentication implementation, across all three projects in a Xamarin Forms app? For now, is v2.x the only available option for ADAL in UWP?

Detected package downgrade: System.Text.RegularExpressions from 4.1.0 to 4.0.12 App1.UWP (>= 1.0.0) -> Microsoft.IdentityModel.Clients.ActiveDirectory (>= 3.13.5) -> System.Xml.ReaderWriter (>= 4.0.11) -> System.Text.RegularExpressions (>= 4.1.0) App1.UWP (>= 1.0.0) -> Microsoft.IdentityModel.Clients.ActiveDirectory (>= 3.13.5) -> System.Text.RegularExpressions (>= 4.0.12) Detected package downgrade: System.Text.RegularExpressions from 4.1.0 to 4.0.12 App1.UWP (>= 1.0.0) -> Microsoft.IdentityModel.Clients.ActiveDirectory (>= 3.13.5) -> System.Runtime.Serialization.Json (>= 4.0.2) -> System.Private.DataContractSerialization (>= 4.1.1) -> System.Text.RegularExpressions (>= 4.1.0) App1.UWP (>= 1.0.0) -> Microsoft.IdentityModel.Clients.ActiveDirectory (>= 3.13.5) -> System.Text.RegularExpressions (>= 4.0.12) Version conflict detected for System.Collections. App1.UWP (>= 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (>= 5.0.0) -> System.Net.Sockets (>= 4.0.0) -> runtime.win.System.Net.Sockets (>= 4.1.0) -> System.Collections (>= 4.0.11) App1.UWP (>= 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (>= 5.0.0) -> Microsoft.NETCore.Runtime (>= 1.0.0) -> Microsoft.NETCore.Runtime.CoreCLR-arm (>= 1.0.0) -> System.Collections (= 4.0.10). Package restore failed for 'App1.UWP'. Package restore failed. Rolling back package changes for 'App1.UWP'.

2

2 Answers

0
votes

I'm not totally sure if this will help, but check the profile that your Xamarin project targets. ADAL 3.x removed support for Windows Phone 8.1. If your project targets a profile that includes WP, you won't be able to install ADAL.

0
votes

This has been fixed in https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/3.13.7

Issue was with the way nuget dependencies were described