Xamarin iOS 构建错误 - 本机链接失败(仅限链接框架 SDK)

you*_*ung 10 linker-errors xamarin.ios xamarin.forms xamarin-linker

Visual Studio 更新后无法运行 Xamarin iOS 项目。

因为更新的 IDE 需要最新的 Xcode(Xcode 11.4 附带的 iOS 13.4 SDK)

环境详情

  • 操作系统版本:macOS Mojave,OS X 10.14.6
  • IDE:Visual Studio Community 2019 for Mac 版本 8.5.1(内部版本 42)
  • Xamarin.iOS 版本:13.16.0.11(Visual Studio 社区)
  • Xamarin.Mac 版本:6.16.0.11(Visual Studio 社区)
  • Xcode 13.2 版

我试过的

我没有更新 Xcode,而是Linker BehaviourLink Framework SDKs Only.

不走运,我收到以下错误。

Error MT5210: Native linking failed, undefined symbol: ___darwin_check_fd_set_overflow. 
Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210)

Error MT5202: Native linking failed. Please review the build log. (MT5202)

Error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

参考

是否有其他选项可以在不更新 Xcode 和 macOS 的情况下解决该问题?

任何帮助将不胜感激。

谢谢

you*_*ung 5

原因:最新的 Visual Studio 需要最新的 Xcode(Xcode 11.4 附带的 iOS 13.4 SDK)

要解决此问题,请安装最新版本Xcode或使用较低 Xamarin.iOS版本

 if you are on a mac, you might be able to find the previous installer here:
Run Code Online (Sandbox Code Playgroud)

~/Library/Caches/VisualStudio/[替换为 Visual Studio 版本]/TempDownload

或者,如果您知道以前版本的 ios 版本,您可以从这里下载(更改版本号以满足您的需求:

https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-13.14.1.39.pkg

Xamarin/xamarin-macios Releases,包含每个版本

如果你在 Windows 上,这篇文章可能会给你一些关于在哪里可以找到本地缓存的线索:https : //montemagno.com/cleanup-up-space-xamarin-dev-machine/

欲知更多详情:Ans-1 | Ans-2


Jac*_*Hua 4

最新版本的 Visual-Studio 使用最新版本的 Xamarin.iOS,这可能无法与较低版本的 Xcode 一起使用。

因此使用较低的 Xamarin.iOS 版本可以解决此问题。