4
votes

We're using Azure DevOps to build our Xamarin Forms mobile app. This has been working without any problems for weeks now. For some reason I am now getting the following error when we build the iOS project:

MT2002: Failed to resolve "AuthenticationServices.ASWebAuthenticationSession" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"

The Android and shared project are working perfectly. This is only a problem with the iOS project.

I haven't changed or updated Xamarin.iOS in any way whatsoever, so cannot understand why I am now getting this error.

I am using Visual Studio 2017 15.8.1 if that makes any difference.

I suspect the error first occurred after adding a reference to Microsoft.Identity.Client preview in the shared project. Is there an issue with this reference and Xamarin.iOS on Azure DevOps?

5
Did you find any solution to this issue? Other than downgrading ? - Rakesh R Nair
In my particular case I have downgraded. The issue has stil not been resolved by Microsoft. - DomBurf
I manage to fix this issue. Now I can run with the latest Identity Client lib. Please find the solution here.github.com/AzureAD/microsoft-authentication-library-for-dotnet/… - Rakesh R Nair
@RakeshRNair Thanks for the update :) - DomBurf

5 Answers

3
votes

I had the same issues, and had to downgrade to version 2.1.0-preview. 2.2.0, 2.2.1 and 2.3.0 give the same error.

1
votes

I had the same issue on Azure DevOps. I have updated mono version from 5.10 to 5.18.1 and build was succeeded.

0
votes

I had the exact same issue. I downgraded my "Microsoft.Identity.Client" package from 2.3.1 to 2.1.0. My Xamarin.forms project version had to be 3.0.0 for this to work.

Hope this helps.

0
votes

I have the same error with microsoft.identitymodel.clients.activedirectory 4.3.0 as well.

That package is also able to save tokens in MSAL-format so perhaps it is also using AuthenticationServices.ASWebAuthenticationSession.

AppCenter won't build at all since it's outdated and Azure DevOps fails with this.

0
votes

You need to have Visual Studio 2017, at least 15.8.7, which has support for XCode10, and XCode10 installed on the Mac to get the classes needed to run ASWebAuthenticationSession (ex. AuthenticationServices). If you still have issues, please open an issue on the MSAL repo.