Error: Failed to resolve “AuthenticationServices.ASWebAuthenticationSession” reference from "Xamarin.iOS

試著忘記壹切 提交于 2020-01-24 08:58:45

问题


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?


回答1:


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.




回答2:


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




回答3:


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.




回答4:


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.




回答5:


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.



来源:https://stackoverflow.com/questions/52896045/error-failed-to-resolve-authenticationservices-aswebauthenticationsession-ref

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!