问题描述
在Xamarin中构建MonoMac项目时,我试图将Mac软件包(.app)作为构建输出.该项目实际上是默认项目-它仅显示一个空窗口,并且可以通过以下方式在Xamarin中创建:添加新项目... ,选择 Mac(开源),然后然后 MonoMac Project(C#).
I am trying to get Mac package (.app) as build output when building MonoMac project in Xamarin. This project is actually a default one - it only displays an empty window and can be created in Xamarin through: Add New Project..., select Mac(open source) and then MonoMac Project (C#).
项目生成没有错误,但是生成输出是.exe文件. 如何设置项目构建,使其输出.app软件包而不是.exe?我查看了 Project Options-> Build-> General ,可以在其中选择将目标编译为*可执行文件/可通过GUI/...执行*,但这不是我所需要的.还查看了Xamarin Studio的 Preferences-> Projects-> Build ,但这也无济于事.
Project builds with no errors but build output is .exe file. How can I set project build so it outputs .app package instead of .exe? I looked at Project Options-->Build-->General where could select Compile Target as *Executable/Executable with GUI/...*but that's not what I need. Also looked at Xamarin studio Preferences-->Projects-->Build but it didn't help either.
我的设置:
- Xamarin studio 4.0.3 (build 13) which includes free MonoMac
- Xcode 4.6.1 (2067, build 4H512); gcc installed
- Mono frameworks 2.10.9 and 2.10.12
- all running on Mac OS X 10.7.5
Debug | x86构建配置的构建输出:
Build output for Debug|x86 build configuration:
推荐答案
查看生成exe的位置:
Look where the exe is generated:
/Users/rolf/Projects/test-project/bin/Debug/ test-project.app /Contents/MonoBundle/test-project.exe
/Users/rolf/Projects/test-project/bin/Debug/test-project.app/Contents/MonoBundle/test-project.exe
输出始终是.app软件包,exe只是进入.app软件包的文件.
The output is always an .app package, the exe is just a file that goes into the .app package.
这篇关于如何设置Xamarin MonoMac项目,使其构建输出.app软件包而不是.exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!