使用Xamarin在Windows上编译OSX应用 [英] Compile OSX app on Windows with Xamarin
问题描述
我有一个Xamarin Mac应用程序,需要进行一些更改.就Windows Visual Studio Xamarin连接到Mac Xamarin而言,我一切正常,Mac ssh代理正常工作.
I have a Xamarin Mac app I've been handed to make some changes. I've got everything working correctly as far as Windows Visual Studio Xamarin connecting to Mac Xamarin -- the Mac ssh agent works and whatnot.
但是,我如何编译该应用程序?当我在Windows上构建它时,它将生成一个.exe文件.是否也应该在Mac端生成某些内容?还是我要获取该.exe文件,然后以某种方式将其打包到OSX应用程序中?
However, how do I compile the app? When I build it on Windows, it generates an .exe file. Is something supposed to be generated on the Mac side, too? Or do I take that .exe file and somehow package it into an OSX app?
我试图留在Windows环境中,以便尽可能地进行编码和构建.
I was trying to stay in my Windows environment to do the coding and building as much as possible.
谢谢.
推荐答案
您将需要在macOS上对其进行编译/打包/调试.
You will need to compile/package/debug it on macOS.
构建过程在Windows上本地执行,生成无法用于运行或调试应用程序的IL程序集,并且不创建应用程序包.
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.
re: https://developer.xamarin.com/releases/vs/xamarin.vs_4/xamarin.vs_4.2/#Xamarin.Mac_minimum_support .
macOS应用 可以在Visual Studio中打开和编译Mac应用程序以检查错误,但是要调试或创建可运行的可执行文件,当前必须在Mac上构建项目.对Mac项目的有限支持使iOS,Android,Windows和Mac应用之间的Visual Studio中的代码共享更加轻松.
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.
re: https://developer.xamarin. com/guides/cross-platform/windows/visual-studio/#macOS_Apps
这篇关于使用Xamarin在Windows上编译OSX应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!