Xamarin.Mac 应用能否在 Windows 上编译为 运行?

Can a Xamarin.Mac app be compiled to run on Windows?

似乎是一个显而易见的问题,但在 Xamarin 网站上并不能清楚地找到答案。如果我在 Mac 上开发 Xamarin 应用程序,对 Mac 使用 Visual Studio,并在 C# 中开发,结果可以是 compiled/built 到 运行 在 Windows?

不,你不能。您可以重复使用在不同平台上编译的结果可移植 .NET 库。

不,您不能在 windows 上编译和 运行 一个完整的 Xamarin.Mac 应用程序。

xamarin 的基本思想是拆分 UI 和非 UI 代码。 UI 部分使用本机 API 并且不可移植。但大多数非 UI 代码都可以在平台之间共享。