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?
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.
I had the same issue on Azure DevOps. I have updated mono version from 5.10 to 5.18.1 and build was succeeded.
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.
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.
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.
Related
We have a Xamarin.Forms project that was created a couple of years ago and after upgrading to the latest build of Visual Studio 2019 (16.2) we are getting nearly 100 errors like the following when building the android version of the project: error: package com.google.android.gms.common.api.GoogleApiClient does not exist
I checked with a colleague who was using Visual Studio build 16.1.3 and the android project built fine but after upgrading their Visual Studio 2019 to the 16.2 build they now get the same problem too. The iOS project continues to build fine.
Does anyone have any suggestions on what to try? I found a bunch of older posts that suggested adding items in the Android SDK manager but none of these changes helped me.
Failing that does anyone know of a way for me to revert my Visual Studio install back to 16.1.3?
Have you updated all NuGet packages? Did it help to move to VS 16.3.5? Have you checked the dependencies of your NuGet packages?
I am having issues with an activity being placed outside of application. It seems like the Google Ads/Admob implementation in Xamarin apps is a source of troubles. Net Core version also seems like a good place to check for a solution.
Having this issue when trying to build Xamarin.Android project (Xamarin.Forms)
Project App.Droid cannot build using TargetFrameworkVersion v8.1 because it is not supported. Please change your Xamarin.Android project to target an API version that is supported.
How do I resolve this issue?
I think I have installed SDKs I need, screenshot is here
After upgrading my VS2017 v.15.3.5 to v.15.7.5, I was able to install newer Android SDKs and tooling and all went well after that.
I am trying to install Microsoft.AspNetCore.SignalR.Client on Xamarin forms (on .net standard 2.0) and run the android app. I keep getting the error
Could not load assembly 'System.Threading.Tasks.Extensions' during startup registration
I have tried installing System.Threading.Tasks.Extensions nuget's latest prerelease, I still get the same error. I did not find any one else with this issue online.
You need Visual Studio 2017 Update 15.8 + Microsoft.AspNetCore.SignalR.Client Package with at least Version 1.0.1
ASP.NET Core 2.1.1 contains fixes to resolve blocking issues when
using the SignalR Client from Xamarin. However, these fixes also
require an updated build of Xamarin.iOS and Xamarin.Android, as
well as some additional dependencies.
In order to use the SignalR Client in Xamarin applications you will
need to:
Upgrade Microsoft.AspNetCore.SignalR.Client to 1.0.1.
Upgrade Xamarin to the appropriate version:
Xamarin.Android 8.4.0.1
VS2017 Update 15.8 comes with Xamarin.Android 9.0.x tools which contains the fix for the issue.
there is a problem.
I've instaled VS 2015 Community version. I wanted to open the project from another computer and there is a problem with it.
Error:
1. Could not find SDK "SQLite.WP81, Version=3.12.2".
Warnings:
1. The referenced component 'SQLite for Windows Phone 8.1' could not be found.
2. Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed
project and projects that depend on it, have been disabled.
What should I do to work on this project on this computer ? How can I download missing SDK ?
P.s. Im going to work on widnows Phone application.
Thx for help!
Your project is missing SQLite For Windows Phone 8.1 library. Download an updated version of SQLite.WP8.1 here https://visualstudiogallery.msdn.microsoft.com/5d97faf6-39e3-4048-a0bc-adde2af75d1b.
Install it and relaunch Visual Studio.
Further information, including complete documentation, may be found at the official web site "http://www.sqlite.org/".
I have a Web API that has version 5.1.2 of the Microsoft.AspNet.WebApi.Client package installed.
I am trying to access the API from an ASP.NET MVC application, which also has the same version of the package installed.
However, in the Global.asax of the Web API project, on the line below, I get the following exception:
WebApiConfig.Register(GlobalConfiguration.Configuration);
Attempt by method 'System.Web.Http.HttpConfiguration..ctor(System.Web.Http.HttpRouteCollection)' to access method 'System.Web.Http.HttpConfiguration.DefaultFormatters()' failed.
I found that this error occurs when you have multiple projects pointing to different .net versions.
For example if you have a Web API project targeting .net 4.5 and a unit test project targeting .net 4.5.3 it seems that default settings mean nuget may silently update the .net 4.5 project references to incompatible versions one day when you open visual studio and cause your Web API project to fail with the recondite 'Attempt by method 'HttpConfiguration..ctor(HttpRouteCollection)' to access method 'HttpConfiguration.DefaultFormatters()' failed' error.
To avoid the error drop the higher .net version back on the new project to match the Web API project - for this example right click the unit test project, click properties, then change the target framework to .net framework 4.5.
In my case it was a discrepancy between versions of Microsoft.AspNet.WebApi.Client and Microsoft.AspNet.WebApi.Core, I tried updating both to the same version and it worked.
In my case, the issue was solved when I installed the Microsoft.AspNet.WebApi.Core as well. So three libraries should present and be in harmony (uninstall / install) Microsoft.AspNet.WebApi.Client, Microsoft.AspNet.WebApi.Core and Newtonsoft.json
same for the above answers in my case also it is working good after updating or reinstalling packages
Microsoft.AspNet.WebApi.Client
Microsoft.AspNet.WebApi.Core