使用 Xamarin 在 Windows 上编译 OSX 应用

Compile OSX app on Windows with Xamarin

我有一个 Xamarin Mac 应用程序,我被要求进行一些更改。就 Windows Visual Studio Xamarin 连接到 Mac Xamarin 而言,我的一切工作正常——Mac ssh 代理工作等等。

但是,我该如何编译应用程序?当我在 Windows 上构建它时,它会生成一个 .exe 文件。是否也应该在 Mac 端生成一些东西?或者我是否获取该 .exe 文件并以某种方式将其打包到 OSX 应用程序中?

我试图留在我的 Windows 环境中,尽可能多地进行编码和构建。

谢谢。

您需要在 macOS 上 compile/package/debug 它。

The build process is performed locally on Windows, generating IL assemblies that cannot be used for running or debugging apps, and it doesn't create application bundles.

回复:https://developer.xamarin.com/releases/vs/xamarin.vs_4/xamarin.vs_4.2/#Xamarin.Mac_minimum_support.

macOS Apps Mac apps can be opened and compiled in Visual Studio to check for errors, however to debug or create a working executable the project must currently be built on a Mac. This limited support for Mac projects allows for easier code sharing in Visual Studio between iOS, Android, Windows, and Mac apps.

回复:https://developer.xamarin.com/guides/cross-platform/windows/visual-studio/#macOS_Apps