Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xamarin Forms iOS - MTOUCH : error MT5210: Native linking failed, undefined symbol #11119

Closed
jamers99 opened this issue Mar 23, 2021 · 13 comments

Comments

@jamers99
Copy link

Description

We're getting lots of MTOUCH errors on our on premise Mac since the latest Visual Studio update.
This is stopping our builds! We can't push updates until this is fixed!
We've tried updating the Mac to High Sierra, but the same issue is happening

Steps to Reproduce

Build with MSBuild (using Azure DevOps Pipeline "Xamarin.iOS" task)

/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild /Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj /p:Configuration=Release /p:Platform=iPhone /p:BuildIpa=true /p:ReleaseConstants=ENABLE_TEST_CLOUD

Expected Behavior

It was previously building our ipa

Actual Behavior

MTOUCH MT5210 errors
Native linking failed, undefined symbol
Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.

More logs
"/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj" (default target) (1) ->
(_CompileToNative target) -> 
  MTOUCH : warning MT0178: Debugging symbol file for '/Users/ecc/.nuget/packages/microsoft.applicationinsights/2.17.0/lib/netstandard2.0/Microsoft.ApplicationInsights.dll' is not valid and was ignored. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'Microsoft.Win32.Primitives.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/runtime.win.microsoft.win32.primitives/4.3.0/runtimes/win/lib/netstandard1.3/Microsoft.Win32.Primitives.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/Microsoft.Win32.Primitives.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.Diagnostics.Debug.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/runtime.win.system.diagnostics.debug/4.3.0/runtimes/win/lib/netstandard1.3/System.Diagnostics.Debug.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.Diagnostics.Debug.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.IO.FileSystem.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/runtime.win.system.io.filesystem/4.3.0/runtimes/win/lib/netstandard1.3/System.IO.FileSystem.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.IO.FileSystem.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.Net.Primitives.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/runtime.win.system.net.primitives/4.3.0/runtimes/win/lib/netstandard1.3/System.Net.Primitives.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.Net.Primitives.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.Net.Sockets.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/runtime.win.system.net.sockets/4.3.0/runtimes/win/lib/netstandard1.3/System.Net.Sockets.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.Net.Sockets.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.Runtime.Extensions.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/runtime.win.system.runtime.extensions/4.3.0/runtimes/win/lib/netstandard1.5/System.Runtime.Extensions.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.Runtime.Extensions.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.Net.NameResolution.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/system.net.nameresolution/4.3.0/runtimes/win/lib/netstandard1.3/System.Net.NameResolution.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.Net.NameResolution.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.Net.Requests.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/system.net.requests/4.3.0/runtimes/win/lib/netstandard1.3/System.Net.Requests.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.Net.Requests.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.Net.Security.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/system.net.security/4.3.2/runtimes/win/lib/netstandard1.3/System.Net.Security.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.Net.Security.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT0109: The assembly 'System.Threading.Overlapped.dll' was loaded from a different path than the provided path (provided path: /Users/ecc/.nuget/packages/system.threading.overlapped/4.3.0/runtimes/win/lib/netstandard1.3/System.Threading.Overlapped.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/14.14.2.5/lib/mono/Xamarin.iOS/Facades/System.Threading.Overlapped.dll). [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'System' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'System.Net.Security' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-security-lsalookup-l2-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-security-base-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-security-provider-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-core-handle-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-core-processthreads-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-core-heap-obsolete-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-core-processthreads-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-security-base-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-core-handle-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'sspicli' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-security-lsapolicy-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'ntdll' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'api-ms-win-core-heap-obsolete-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'Kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : warning MT5215: References to 'libEGL' might require additional -framework=XXX or -lXXX instructions to the native linker [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]

"/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj" (default target) (1) ->
(_CompileToNative target) -> 
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _AdjustTokenPrivileges. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _CheckTokenMembership. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _CloseHandle. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _CreateWellKnownSid. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _DuplicateHandle. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _DuplicateTokenEx. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetCurrentProcess. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetCurrentThread. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetNamedSecurityInfoW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetSecurityDescriptorLength. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  clang : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetSecurityInfo. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetTokenInformation. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetWindowsAccountDomainSid. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _ImpersonateLoggedOnUser. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LocalAlloc. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LocalFree. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LookupPrivilegeValue. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LsaClose. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LsaFreeMemory. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LsaFreeReturnBuffer. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LsaGetLogonSessionData. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LsaLookupNames2. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LsaLookupSids. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _LsaOpenPolicy. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _OpenProcessToken. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _OpenThreadToken. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _RevertToSelf. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _RtlNtStatusToDosError. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _SetNamedSecurityInfoW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _SetSecurityInfo. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5210: Native linking failed, undefined symbol: _SetThreadToken. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]
  MTOUCH : error MT5202: Native linking failed. Please review the build log. [/Users/ecc/MacAgent/w/3/s/Features/MyEbms/MyEbms/Mobile/MyEbms.Mobile.iOS/MyEbms.Mobile.iOS.csproj]

Basic Information

  • Version with issue: Xamarin 5
  • Last known good version: ?? VS update
  • Platform Target Frameworks:
    • iOS: 14.4

Environment

Show/Hide Visual Studio info
=== Visual Studio Community 2019 for Mac ===

Version 8.9.2 (build 0)
Installation UUID: ffc52ff2-88e8-4710-a639-2d714fb8ad47
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

	Package version: 612000125

=== Mono Framework MDK ===

Runtime:
	Mono 6.12.0.125 (2020-02/8c552e98bd6) (64-bit)
	Package version: 612000125

=== Xamarin Designer ===

Version: 16.9.0.316
Hash: 2241b204a
Branch: tags/vsm-rel/d16.9-4540908
Build date: 2021-03-10 22:18:10 UTC

=== Roslyn (Language Service) ===

3.9.0-6.21152.10+c10f884b30737542ddd84ca889a4aad9281ce210

=== NuGet ===

Version: 5.8.0.6860

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.201/Sdks
SDK Versions:
	5.0.201
	5.0.101
	5.0.100
	3.1.407
	3.1.404
	3.1.403
	3.1.402
	3.1.401
	3.1.302
	3.1.301
	3.1.300
	3.1.200
	3.1.102
	3.1.101
	3.1.100
	3.0.101
	3.0.100
	2.2.300
	2.1.700
	2.1.505
	2.1.402
	2.1.302
	2.1.301
	2.1.4
	2.0.0
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	5.0.4
	5.0.1
	5.0.0
	3.1.13
	3.1.10
	3.1.9
	3.1.8
	3.1.7
	3.1.6
	3.1.5
	3.1.4
	3.1.2
	3.1.1
	3.1.0
	3.0.1
	3.0.0
	2.2.5
	2.1.23
	2.1.22
	2.1.21
	2.1.20
	2.1.19
	2.1.18
	2.1.16
	2.1.15
	2.1.14
	2.1.13
	2.1.11
	2.1.9
	2.1.4
	2.1.2
	2.1.1
	2.0.5
	2.0.0

=== .NET Core 3.1 SDK ===

SDK: 3.1.407

=== Xamarin.Profiler ===

Version: 1.6.12.26
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 11.2.2.1 (Visual Studio Community)
Commit: xamarin-android/d16-9/877f572
Android SDK: /Users/ecc/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.5
SDK Build Tools Version: 29.0.2

Build Information: 
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-9@54f8c24
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.34.1@daff8f4
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-9@d210f11

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/ecc/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.9.0.22
Hash: a391de2
Branch: remotes/origin/d16-9
Build date: 2021-03-05 19:52:30 UTC

=== Android Device Manager ===

Version: 16.9.0.17
Hash: fc2b3db
Branch: remotes/origin/d16-9
Build date: 2021-03-05 19:52:54 UTC

=== Apple Developer Tools ===

Xcode 12.4 (17801)
Build 12D4e

=== Xamarin.Mac ===

Version: 7.8.2.5 (Visual Studio Community)
Hash: 3836759d4
Branch: d16-9
Build date: 2021-02-10 17:56:43-0500

=== Xamarin.iOS ===

Version: 14.14.2.5 (Visual Studio Community)
Hash: 3836759d4
Branch: d16-9
Build date: 2021-02-10 17:56:44-0500

=== Build Information ===

Release ID: 809020000
Git revision: a69906fb0095d046b113a63419c9af3034ce104e
Build date: 2021-03-11 14:01:37-05
Build branch: release-8.9
Xamarin extensions: a69906fb0095d046b113a63419c9af3034ce104e

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.3.0 Darwin Kernel Version 20.3.0
    Thu Jan 21 00:07:06 PST 2021
    root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64


Build Logs

Full logs from Azure DevOps

Workaround

No workarounds found!

@jamers99
Copy link
Author

Note that the warnings in the logs happen on succeeding builds.

@jamers99
Copy link
Author

We just ran the same pipeline on an Azure Hosted agent and it failed with the same issue. So it seems like a problem between our code and the VS version.

@jamers99
Copy link
Author

Just noted that another simpler app works. We are working to find the difference between the two that is causing the issue.

@jamers99
Copy link
Author

Just noted that this is also reproducible from Visual Studio on the Mac.

@jamers99
Copy link
Author

Continuing to narrow down our project, but it's slow work. Does anyone have ideas on how to read the logs or something?

@jamers99
Copy link
Author

Got to the point that the build worked. Adding the code back to narrow down further, still a lot of code to go... 😓

@jamers99
Copy link
Author

Continuing to whittle this down, but it's slow progress, each build takes almost 10 minutes to fail or succeed. I've gotten it down to a single (rather large) project, so the issue is somewhere in the project's code.

Any pointers would be very valuable!

@jsuarezruiz
Copy link

Using VS4Mac you can get the logs from ~/Library/Logs/VisualStudio/8.0/
There you can find the Ide logs and get information about the Ide, builds, etc.

Do you know which is the latest version of VS or Xamarin.Ios with which everything compiled without problems?

@jamers99
Copy link
Author

@jsuarezruiz no, unfortunately we do not. It's been a while since we upgraded.

@narciszait
Copy link

Using VS4Mac you can get the logs from ~/Library/Logs/VisualStudio/8.0/
There you can find the Ide logs and get information about the Ide, builds, etc.

Do you know which is the latest version of VS or Xamarin.Ios with which everything compiled without problems?

as i commented in the linked issue,
VS for Mac 8.8.10 works without a problem.
VS for Mac 8.9.x (don't know the exact number) initially gave only 6 native linker errors, but now it gives like 36 and some of them are the same as in the build log above.
These 2 installations are on 2 different macs, but the Xcode version is the same on both machines: 12.4

There are some discussions that some NuGet packages cause this issue - we found one, there is a mention of a different one - i am not totally convinced.

@DanielGlick
Copy link

I have verified that the workaround by Juwens here fixes my issue.

@jamers99
Copy link
Author

jamers99 commented Mar 25, 2021

Nice! Juwens fix did it!

While I am very happy to have found a workaround, I'm not so happy that this whole thing happened. What steps are being taken to make sure things like this don't happen?

@Redth Redth transferred this issue from xamarin/Xamarin.Forms Apr 5, 2021
@mandel-macaque
Copy link
Member

Since this a duplicate of issue #10884 lets close this issue and continue the conversation in the #10884 since we have more info and people there.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants