有人在大型或中型项目中使用过。net开源实现Mono吗?我想知道它是否已经为现实世界的生产环境做好了准备。它是否稳定、快速、兼容……足够用了吗?将项目移植到Mono运行时是否需要花费大量的精力,或者它是否真的足够兼容,只需要为微软的运行时编写代码就可以了?
当前回答
我个人在黄金时段使用Mono。 我运行单服务器处理千兆字节的udp/tcp数据处理相关任务,不能再高兴了。
有一些特殊之处,其中最烦人的事情之一是,由于Mono的当前状态,你不能“构建”你的msbuild文件:
MonoDevelop (the IDE) has some partial msbuild support, but will basically bork on any "REAL" build conf beyond a simple hello-world (custom build tasks, dynamic "properties" like $(SolutionDir), real configuration to name a few dead-ends) xbuild which SHOULD have been the mono-supplied-msbuild-fully-compatible-build-system is even more horrible, so building from the command line is actually a worse experience than using the GUI, which is a very "unorthodox" state of the union for Linux environments...
一旦/在你的东西真正构建的过程中,你可能会看到一些应该支持的代码的荒野:
编译器在某些构造上出错 一些更高级的/新的。net类向你抛出意想不到的垃圾(XLinq的人吗?) 一些不成熟的运行时“特性”(3GB堆限制在x64…WTF !)
但heaving表示,一般来说,事情很快就会开始起作用,而且解决方案/变通方法很多。
一旦你克服了这些最初的障碍,我的经验是,mono很摇滚,并在每次迭代中变得越来越好。
我有使用mono运行的服务器,每天处理300GB的数据,有大量的p/调用,通常来说要做大量的工作,并且保持5-6个月,即使使用“最先进的”mono。
希望这能有所帮助。
其他回答
如果你想使用WPF,那你就不走运了,Mono目前还没有计划实现它。
http://www.mono-project.com/WPF
我可以想象,如果你有一个带有一些第三方组件的应用程序,你可能会被塞满。我怀疑很多供应商会在开发过程中考虑到Mono
例如:http://community.devexpress.com/forums/p/55085/185853.aspx
对于公认答案的建议现在有点过时了。
The windows forms implementation is pretty good now. (See Paint-Mono for a port of Paint.net which is a pretty involved Windows forms application. All that was required was an emulation layer for some of the P-Invoke and unsupported system calls). Path.Combine as well as Path.Seperator to join paths and filenames. The windows Registry is OK, as long as you are only using it for storing and retrieving data from your applications (i.e. you can't get any information about Windows from it, since it is basically a registry for Mono applications).
Yes it definitely is (if you're careful though) We support Mono in Ra-Ajax (Ajax library found at http://ra-ajax.org) and we're mostly not having problems at all. You need to be careful with some of the "most insane things" from .Net like WSE etc, and also probably quite some few of your existing projects will not be 100% Mono compatible, but new projects if you test them during development will mostly be compatible without problems with Mono. And the gain from supporting Linux etc through using Mono is really cool ;)
我认为支持Mono的很大一部分秘密是从一开始就使用正确的工具,例如ActiveRecord, log4net, ra-ajax等。
不,单核细胞增多症还不能胜任严肃的工作。我用f#在Windows上写了几个程序,然后在Mono上运行。这些程序相当密集地使用磁盘、内存和cpu。我看到在单库(托管代码)中崩溃,在本地代码中崩溃,在虚拟机中崩溃。当mono运行时,程序比Windows中的。net慢了至少两倍,并且占用了更多的内存。在严肃的工作中远离单核细胞增多症。
推荐文章
- 如何在Visual Studio中找到堆栈跟踪?
- 如何强制LINQ Sum()返回0而源集合是空的
- 如何创建数组。包含不区分大小写的字符串数组?
- 如何从字符串中删除新的行字符?
- 是否已经添加了事件处理程序?
- Lookup()和Dictionary(Of list()的区别
- 如何从我的c#代码运行EXE文件?
- Node.js vs .Net性能
- .NET控制台应用程序中的全局异常处理程序
- 枚举上最常见的c#位操作
- PowerShell脚本在机器上返回。net框架的版本?
- 用c#创建一个空文件
- 如何改变列表<T>数据IQueryable<T>数据
- 您可以使用反射来查找当前正在执行的方法的名称吗?
- 流。Seek(0, SeekOrigin.Begin)或Position = 0