如何在Visual Studio中为OS X编写代码? [英] How do I write code for OS X in Visual Studio?

查看:99
本文介绍了如何在Visual Studio中为OS X编写代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





这是一个广泛的问题,其答案似乎令人难以置信。我有一台带有Visual Studio的Windows 7 Pro PC和一台坐在它旁边的MacBook OS-X Yosemite。在Visual Studio被称为开放一切的这些日子里,甚至现在可以作为独立进程访问MSBuild工具,我发现很难相信不可能设置一个环境来从VS内部开发桌面/平板电脑应用程序在Windows和OS-X上运行。



当然,我知道需要特定于平台的代码(特别是在UI中),但是我我之前做过那种开发。



有Xamarin选项,看起来不错,但对像我这样的单人乐队来说价格昂贵。



任何人都可以就我可能寻求帮助的地方提供任何建议。我想理想情况下我想要一个关于如何设置工具链的好教程。





亲切的愿望~Patrick

解决方案

我想说,还没有。这就是我的建议:最好等到今年年底为Visual Studio 2015.



或者,使用Mono for Mac OS X和Mono for Windows。 Mono for Windows将大量用于在Windows上进行测试,因为存在大量不兼容性:

http://en.wikipedia.org/wiki/Mono_%28software%29 [ ^ ],

http:// www。 mono-project.com/ [ ^ ]。



除了Visual Studio,您还可以使用MonoDevelop: http:// en。 wikipedia.org/wiki/MonoDevelop [ ^ ]。



使用Mono运行许多Windows应用程序没有重新编译这不是一个大问题。在所有平台上,除了...... Apple之外,那些 System.Windows.Forms 应用程序看起来很外观和丑陋。基于Qt和GTK +的应用程序也是如此。要开发真正的Apple风格UI(不是我推荐的,但你可能需要这样做),你需要(浪费?:-))更多的努力。你需要的第一件事是monobjC:

http://en.wikipedia.org/wiki/Monobjc [ ^ ],

http://www.monobjc.net/ [ ^ ]。



我做到了;它可以工作,但只是在Windows系统上开发变得有问题,你真的需要一个Mac OS X系统。



-SA

Hi,

This is a broad question, the answer to which seems surprisingly elusive. I have a Windows 7 Pro PC with Visual Studio and a MacBook OS-X Yosemite sitting here next to it. In these days of Visual Studio being 'open-everything', with even the MSBuild tool now accessible as a standalone process, I find it difficult to believe it is not possible to set up an environment to develop from within VS a desktop/tablet app to run on Windows and OS-X.

Of course, I understand that there will need to be platform-specific code (especially in the UI), but I've done that kind of development before.

There is the Xamarin option, which looks good, but is pricey for a one-man-band like me.

Can anyone offer any advice on where I might look for help with this. I suppose ideally I would like a nice tutorial on how to go about setting up the tool chain.


Kind wishes ~ Patrick

解决方案

I would say, not yet. This is what I would advise: better wait till the end of this year for Visual Studio 2015.

Alternatively, use Mono for Mac OS X and Mono for Windows. Mono for Windows will be heavily used for testing on Windows, because there is a good number of incompatibilities:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/[^].

Alternatively to Visual Studio, you can use MonoDevelop: http://en.wikipedia.org/wiki/MonoDevelop[^].

It's not a big problem to use Mono for running many Windows applications without recompilation. On all platforms, except… the Apple's, where those System.Windows.Forms application looks foreign and ugly. Same goes for Qt and GTK+ based applications. To develop true Apple-style UI (not that I recommend it, but you might be required to do so), you will need (waste? :-)) a lot more effort. First thing you will need is monobjC:
http://en.wikipedia.org/wiki/Monobjc[^],
http://www.monobjc.net/[^].

I did it; it works, but development on just a Windows system becomes too problematic, you would really need a Mac OS X system in your hands.

—SA


这篇关于如何在Visual Studio中为OS X编写代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆