question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Linker issues at building v4 in release modes

See original GitHub issue

Which Version of MSAL are you using ? MSAL 4.4.0

Platform xamarin android, xamarin iOS

What authentication flow has the issue? Building in non debug modes after updating from v2.7.1

Is this a new or existing app? a. The app is in production, and I have upgraded to a new version of MSAL

Expected behavior Compiles as debug builds

Actual behavior Resolution errors at compilation (see below)

Possible Solution

Additional context/ Logs / Screenshots

Android:

error MSB4018: The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.Void Microsoft.Azure.Services.AppAuthentication.AdalAuthenticationContext/<AcquireTokenAsync>d__0::MoveNext()' in assembly:
'Microsoft.Azure.Services.AppAuthentication.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve
System.Threading.Tasks.Task`1<Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult> Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions::AcquireTokenAsync(Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext,System.String,System.String,Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential)

iOS:

error MT2101: Can't resolve the reference
'System.Threading.Tasks.Task`1<Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult> Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions::AcquireTokenAsync(Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext,System.String,System.String,Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential)',
referenced from the method 'System.Void Microsoft.Azure.Services.AppAuthentication.AdalAuthenticationContext/<AcquireTokenAsync>d__0::MoveNext()'
in 'Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.14.2.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
AdamDiamentcommented, Apr 23, 2020

@deep-mm @AdamDiament Ups, totally missed the previous notification. I just kept the older version of Microsoft.Azure.ServiceBus

Thanks for the reply @DiegoFaFe . Downgrading wasn’t an option for me dependency-wise, I need 4.x. Fortunately changing my Xamarin android linker behaviour to “Sdk and User Assemblies” seemed to clear up the build issue for me.

1reaction
helderdbcommented, Oct 30, 2020

Also having this issue, but downgrading to V2.0.0 of the package (Azure Service Bus) feels weird since last version is 5 at the time of writing. Any plans for fixing this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

MSVC - C++ - Release build failed - linker error
I'd check in the Project settings that all the .lib includes and dlls are included in both Release and Debug modes.
Read more >
Internal link error when compiling in Release mode
When I compile my DLL project in Release mode, I get the following linker error: 1>------ Erstellen gestartet: Projekt: K-Lib, ...
Read more >
my project can pass building in debug mode, but error ...
This error occurs when upgrading Android version 13 (API 33) and only in 'Release' mode, as there are no errors in 'debug' mode....
Read more >
C++ linking error in release mode - MacOSX and iOS
The message indicates an internal linker error. These tend to be the nasty types that indicate a very low-level problem (or bug) in...
Read more >
LINK2001 error when trying to build in Release mode x64 ...
Hi, I'm using the dynamic version of the library and when building a debug (x64) version, everything works fine (except for font loading)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found