8

我无法构建我的 Xamarin iOS 项目。

有用:

  • 在使用物理设备的调试模式下
  • 在使用模拟器的调试模式下
  • 使用模拟器处于发布模式

但它不会工作:

  • 在物理设备的发布模式下!

我试过了:

  • 所有链接器行为:没有成功
  • 删除 obj 和 bin 文件夹并重建:没有成功
  • 删除 Library/Caches/mtbs/builds/ 并重建:没有成功
  • 降级 Visual Studio:没有成功
  • 将 --registrar:dynamic 添加到 mtouch 参数:没有成功

NuGet 包:

<PackageReference Include="Acr.UserDialogs" Version="7.1.0.483" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
<PackageReference Include="TouchView" Version="4.1.100" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="Xamarin.Forms.InputKit" Version="3.7.2" />

错误:

Error MT5210: Native linking failed, undefined symbol: _EqualDomainSid. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _IsWellKnownSid. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _ConvertStringSidToSidW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _LsaLookupAuthenticationPackage. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _AllocateLocallyUniqueId. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegCloseKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegQueryValueExW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _FormatMessageW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _LsaConnectUntrusted. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegEnumKeyExW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _LsaLogonUser. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _ConvertStringSecurityDescriptorToSecurityDescriptorW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegQueryInfoKeyW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegSetValueExW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _LsaDeregisterLogonProcess. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegEnumValueW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegCreateKeyExW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegDeleteValueW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegDeleteKeyExW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegOpenKeyExW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegConnectRegistryW. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
Error MT5210: Native linking failed, undefined symbol: _RegFlushKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210) (MyXApp.iOS)
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. (MT5210) (MyXApp.iOS)
Error MT5202: Native linking failed. Please review the build log. (MT5202) (MyXApp.iOS)
/Users/miyazaki/Projects/MyXApp/MyXApp.iOS/clang: Error: linker command failed with exit code 1 (use -v to see invocation) (MyXApp.iOS)

截图:

关于 Visual Studio

项目选项

找到解决方案感谢@steven:

https://github.com/xamarin/xamarin-macios/issues/10884#issuecomment-803450479

4

0 回答 0