[Bug] Linker issues at building v4 in release modes
See original GitHub issueWhich 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:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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?