Skip to content

Troubleshooting Xamarin.Android issues with MSAL

Jean-Marc Prieur edited this page Apr 11, 2019 · 15 revisions

If you create a new Xamarin.Forms application and add a reference to the MSAL.Net NuGet package, this will just work. However, if you want to ugrade an existing Xamarin.Forms application to MSAL.NET preview 1.1.2 or later you might experience build issues.

To troubleshoot these issues you should:

  • Update the existing MSAL.NET NuGet package to MSAL.NET preview 1.1.2 or later
  • Check that Xamarin.Forms automatically updated to version 2.5.0.122203 (if not, update to this version)
  • Check that Xamarin.Android.Support.v4 automatically updated to version 25.4.0.2 (if not, update to this version)
  • All the Xamarin.Android.Support packages should be targetting version 25.4.0.2
  • Clean/Rebuild
  • Try setting the max parallel project builds to 1 in Visual Studio (Options->Projects and Solutions->Build and Run-> Maximum number of parallel projects builds)
  • Alternativly, if you are building from the command line, try removing /m from your command if you are using it.

If you get The name 'AuthenticationContinuationHelper' does not exist in the current context

This is probably because Visual Studio did not update correctly the Android csproj. Sometimes the incorrectly contains netstandard13 instead of monoandroid81

    <Reference Include="Microsoft.Identity.Client, Version=3.0.4.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
      <HintPath>..\..\packages\Microsoft.Identity.Client.3.0.4-preview\lib\monoandroid81\Microsoft.Identity.Client.dll</HintPath>
    </Reference>

Getting started with MSAL.NET

Acquiring tokens

Desktop/Mobile apps

Web Apps / Web APIs / daemon apps

Advanced topics

News

FAQ

Other resources

Clone this wiki locally